DIY Candy Dispenser Machine Using REKA:BIT With Micro:bit


Let’s learn how to make a candy machine using REKA-BIT, where it can automatically drop candies when we place our hand under the cone! 🍭✨

Video Tutorial

Step 1: Components and Tools

Electrical Components Required:

Tools Required:

  • Cardboard
  • Hot Glue Gun
  • Scissor
  • Cellophane Tape
  • Aluminum Foil

All listed components can be found on our website Cytron Technologies


slide1 slide2 slide3 slide4 slide5 slide6  

Bring cardboard and cut it according to the dimensions that appear in the picture above.

After that, start to attach the cardboard parts as shown in the pictures above using a hot glue gun.

  1. Attach the sides on the base of the box
  2. Attach the yellow part on the front side
  3. Use cellophane tape to attach the back part to the box on the left side only (so we always be able to open the box from the backsid)
  4. Use cellophane tape to attach the top part on the box from one side only (so we can refill the candy from the top)
  5. Finally, the box should look like picture number 5.

Note: I’ve covered the cardboard with white paper, and placed the “Candy Template” on the front side of the cardboard.

You can also print and use the same template, download the pdf file below:
Candy Machine – A4 Size Template


Fig1 Fig2 Fig3 Fig2 Fig5 Fig6 Fig7

  1. Cut another piece of cardboard into this flat cone shape
  2. Cover the cardboard with aluminum foil (to store the candy safely)
  3. Attach the parts together, and add another piece of cardboard at the top to cover the candy
  4. Take another piece of cardboard and attach it to the servo motor as shown in figure 4
  5. Place REKA:BIT on the front side using (cable ties, or hot glue)
  6. Attach the other components on the backside as shown in figure 6
  7. Finally, the candy box should look like figure number 7



  • Connect the servo motor to the S1 port
  • Connect the ultrasonic sensor to the first Grove port
  • Power up the REKA:BIT using batter holder jack

Step 5: CODE


Now, connect your REKA:BIT to your device and open MakeCode editor to start programming.

  • Add REKA:BIT extension and follow the code block in the picture above
  • After completing the code block, download it and compile it over REKA:BIT

You can also view and edit the code by clicking here!



Now all what you have to do is filling the upper cone with some candy, and placing your hand under the lower cone to enjoy it!

Don’t forget to show your friends your awesome machine and share the candy with them!

Have a good day, Maker 🙂

Leave a Comment

Your email address will not be published.

Share this Tutorial

Share on facebook
Share on whatsapp
Share on email
Share on print
Share on twitter
Share on pinterest
Share on facebook
Share on whatsapp
Share on email
Share on print
Share on twitter
Share on pinterest

Latest Tutorial

Low Profile Aluminum Case and Icon Case Stress Test
In-Home Security System using Maker Uno.
Learn to program Arduino using Tinkercad Circuit.
DIY Digital Alarm Clock Using REKA:BIT With Micro:bit
Display Internet Time (NTP) on micro:bit
Tutorials of Cytron Technologies Scroll to Top