Donation Robot V2

Donation Robot Version 2

(Using the WuKong breakout board instead of the Hummingbird Bit controller)

Parts:

  • 1 – micro:bit board
  • 1 – WuKong Elecfreaks micro:bit breakout board
  • 1 – standard servo
  • 1 – VEX steel spring limit switch
  • 2 – F to F single-wire jumper wire
  • 1 – LED with 100 ohm resistor already wired in series
  • 1 – Medium size paper or plastic box

Build Steps

Micro:bit & Breakout Board Assembly

  1. Completely charge your breakout board.
  2. Plug microbit board into breakout board so that the microbit LED display is facing away from the center of the breakout board

Servo Assembly

  1. Put a either a round, four arm, six arm servo horn onto your servo with the screw that comes with it.
  2. Attach a small empty thread spool to the servo arm with hot glue, centering it on top of the servo horn.
  3. Attach a 12” length of thread onto the spool with a drop of hot glue.
  4. Wind the thread around the spool for now.
  5. Plug the servo into servo pin set S0 on the breakout board making sure that the black or brown wire is plugging into the black (“G”) side of the three pins.

Limit Switch Assembly

  1. Cut the spring on the limit switch with a hacksaw so that it is slightly shorter than the coin that you intend to use.
  2. Round the sharp edges of the limit switch spring.
  3. Plug the black pin of the limit switch cable into one of the female to female jumper wire.
  4. Plug the white pin of the limit switch cable into the remaining female to female jumper wire.

Donation Robot Assembly

  1. Mount the microbit / breakout board assembly on the top of the box with some hot glue.
  2. Cut a small hole in the box for coins.
  3. Mount the limit switch under the hole that you just cut out so that when a coin is put into the hole, the limit switch closes. (The limit switch acts as a sensor so that the robot knows when it has gotten a coin.
  4. Mount the servo motor on the side of the box, hanging over the edge, so that the string is dangling.

Programming

  1. On your computer open Chrome and navigate to: https://makecode.microbit.org/#editor
  2. Add the WuKong Elecfreaks extension by 1. clicking “Extensions” in the code area, 2. search for “WuKong”, 3. Click on the “wokong” link. (The WuKong extension will be added and this will give you the code for the servomotor.
  3. Go back to the microbit editor in chrome: https://makecode.microbit.org/#editor
  4. Drag and drop the program / code into place as shown in the drawing.
  5. Pay attention to all of the settings on each line of drag and drop code—especially the pin numbers and the numerical amounts
  6. Ensure that the breakout board is fully charged.
  7. Plug the breakout board into the computer.
  8. Select “Connect Device” from the Setting (the gear) menu on the web page.
  9. Connect to your microbit/breakout board assembly.
  10. Download the program using the “Download” button on the web page.
  11. Test your robot by dropping in a coin into the slot that you cut in the box. If you did everything right, you should see a hear, a smile, some happy music, and the servo motor will turn, winding up the string.