Rotating Dish Washing Brush

Our CPX device is a rotating dishwashing brush that washes your dishes for you. All you have to do is hold the handle.
Supplies







For this project, you will need:
Print the Brush
Download and print the STL file below using a 3D printer
This file was designed using TinkerCAD
The file can be downloaded below
Import the brush.STL file into MakerBot to prepare for printing. Then, export it to your files, put this file onto a flash drive, and use it to print on a 3D printer with a raft.
Downloads
Ensure That Circuit Python Is Installed on Your Device
If you do not already have Circuit Python installed on your device, use the link provided below to help you get started.
Connect CPX

Connect CPX to your computer as seen in the photo above, using the USB connector
Cut a Hole
Measure the size of your servo motor, and using scissors or a sharp object, cut a hole in the middle of the 3D-printed brush that will fit the servo motor.
Then, place the servo motor in the hole.
Glue

Feed the wired through and use a hot glue gun to attach the servo motor to the back of the dish brush head.
Attach the Alligator Clips to the Proper Connection on the CPX


- The alligator clip that attaches to the orange/yellow wire of the servo motor must be clipped to the circle labeled A2 on the CPX
- The alligator clip that attaches to the brown/black wire of the servo motor must be clipped to the GND
- The alligator clip that attaches to the red wire of the servo motor must be clipped to the Vout
Copy the Code

Copy the code below and then open your Mu editor. Once opened, paste the code into your Mu editor.
The provided code will:
If Button A is pressed, the servo motor rotates from 50 to 180 degrees
If Button B is pressed, the servo motor's angle is set to 0 degrees. This stops the rotation of the brush
When the switch is in the on position, the servo motor rotates from -50 to -180 degrees. The LED pixels on the board also change color based on the button and switch states.
Save to Device

Once the code is copied into the Mu editor, press the save button seen above. In the picture, the location of the save button is circled. When you click the save button the code will be save to the CIRCUITPY disk drive as code.py. The code won't run if you name it anything else.
Usage
Once the dish brush is assembled and the CPX device is coded, the dish brush will be ready for use.
Button A will start the rotation of the brush.
Button B will stop the rotation.
Button C will rotate the brush in the opposite direction.