Dark Matters
  • About Me
  • Publications
  • Educational Resources
  • Blog
  • Other Interests

Arduino Report #6: Project 9--LED Dice

1/29/2013

0 Comments

 
Additional Parts:
  1. Red LEDs x 7
  2. 220 Ohm Resistors x7
  3. Push-to-make Switch
  4. 100k Ohm Resistor

Time to Complete: 15 minutes
Picture
In this project, we get to use the random number generator in the Arduino library to simulate rolling a die at the push of a button. Again, this project is very simple. Some care needs to be taken to make sure to wire the LEDs in the correct direction and to place them in the proper configuration for a die. There is a little bit annoying wiring between the legs of LEDs, but with minimal concentration, the desired pattern is easily achieved. 

The program associated with this project is more complicated than most of the other ones before, with the Morse code translators being the exceptions. The appropriate LED pattern needs to be associated with its corresponding number. This involves keeping track of which LED is attached to which pin. It helps to write it down. 

The next step is to simulate the rolling of a die by creating a cascade of numbers. In this case, a random number is called to determine the length of the roll  (arbitrarily chosen to be between 14 and 24 numbers). Then, the corresponding number of random values between 1 and 6 are generated and flashed in sequence until the final number is shown. Pressing the button starts the first roll and each subsequent roll. The video is, of course, below.

Something like this could be a fun substitution in a family game night. I won't take this one apart until the kids have had a chance to play with it for a few minutes.

Keeping with the theme of proceeding with the project for which I already have the parts, the next project will probably be the USB temperature logger. I am not sure if I have a the rotary encoder needed for the second traffic light project.

0 Comments



Leave a Reply.

    Archives

    July 2015
    February 2014
    November 2013
    October 2013
    September 2013
    July 2013
    June 2013
    May 2013
    April 2013
    March 2013
    February 2013
    January 2013

    Categories

    All
    Arduino
    Chess
    Lightsaber
    Math
    Probability
    Projects
    Python
    Raspberry Pi
    Robotics
    Statistics

    The Great Arduino Project

    RSS Feed

Powered by Create your own unique website with customizable templates.