Before we build the mechanism we'll first wire up the electronics to make sure everything is working correctly. This will also help us get a handle on how the electronics will work in tandem with the cardboard and string components.
- Take the continuous servo's cable and plug in corresponding cable to CPX: Orange/yellow goes to A1 on the CPX, red to VOUT, brown/black to GND*
- Connect the battery to the CPX via the JST connector.
* If you have the alligator clip to jumper wires this will be possible. If you only have wires, skip ahead to "Prep and Mount Electronics" section for how to wire the project with these components. I didn't have those specific components so I used alligators clips and attached them to jumper wires which works just fine as well for testing out the electronics.
The code should now be running so try it out!
- When the board is powered up, the NeoPixels on the CPX should turn red.
- When you shake the CPX, the NeoPixels should begin counting down turning clock-wise from red to white one NeoPixel every second.
- When the last NeoPixel turns white, NeoPixels turn into a rainbow pattern, the servo turns for 3 seconds and the "Auld Lang Syne" song comes on.
- After the servo is done turning the CPX should continue playing the song with rainbow NeoPixels until the song finishes.
- After a couple more seconds, the servo should turn the other way for about 3 seconds, then the NeoPixels should turn red again ready to restart the process.
If you are having issues getting things to work check out this extended guide here.
Text editor powered by tinymce.