Arduino Dice Rolling Machine With Sound

by yutunghsu in Circuits > Arduino

233 Views, 0 Favorites, 0 Comments

Arduino Dice Rolling Machine With Sound

BBBAEA18-FE08-4BB8-A562-4D6835AE3DF6.jpeg

In this tutorial, you will learn how to build an Arduino Dice Rolling Machine with sound effects(the sound effects of 1 to 6 is Do, 262Hz to La, 440Hz) . You can generate numbers and also sound effects with only a single touch. The machine is very simple and easy, scroll down and you will see the materials, steps, and the code for the machine.

Materials

F57TVYKKNN6JCAD.jpg

Before building the dice rolling machine, you need to prepare all the materials needed to prevent missing steps.

These are the materials needed:

  • x1 Breadboard
  • x1 Arduino Leonardo
  • x7 LED lights
  • x1 Speakers
  • x8 resistors
  • x16 or more Wires
  • x1 USB cord
  • x1 Arduino Software
  • x1 Laptop

Attach LED Lights, Button and Wires

FH40ANAKNN6JLLS.jpg
FQHRGVRKNN6JLLQ.jpg
FBVIZZ9KNN6JLEE.jpg
螢幕擷取畫面 (2).png

Attach 7 LEDs and a button to the breadboard, see the picture and photos as the sample and follow the circuit in the first picture so you can connect it easily. Make sure you don't mess the rows up so it can work.

Attach Speaker

螢幕擷取畫面 (4).png
2CDB3ED1-A210-4E02-8484-312C6B0FF4A1.jpeg

Third, connect the speaker to the Arduino. You can attach the button and speaker anywhere you want on the breadboard. However, connect them to the D-pin where your code set to make sure it can work. Use the circuit image as an example for plugging the speaker onto the breadboard.

Make a Cover

18279E31-12E5-448C-BFC2-0AAB9A0CD4D6.jpeg
DB71BBA2-8BE3-411E-BEF0-C9492F3FDDF3.jpeg

Next, create a cover for your machine. You can simply place the Arduino inside a box and decorate it. Do any cover you want and make your own special cover for the machine. Here is an example, I place the arduino in a box and leave the seven LEDs and the button outside. And I decorated it with paper and illustrations.

Code

Last, when you are done building the circuit and making the cover, input the Arduino code by open it in your Arduino software.

Finish~

Arduino Dice with Sound Effects

Now you are done with the Arduino dice rolling machine with sound effects! Make your own changes to it if you want to!

(The video is the machine working, remember to turn on the sound.)