Shop OBEX P1 Docs P2 Docs Learn Events
Electronic Dice — Parallax Forums

Electronic Dice

GreyGrey Posts: 2
edited 2010-04-28 08:29 in Learn with BlocklyProp
Is it possible to create an electronic random dice roller with a basic stamp 2·kit? I've been wondering and I can't find anything on it.

Comments

  • silverbacksilverback Posts: 40
    edited 2010-04-27 10:12
    Here is a solid state Dice Project that uses a 555 as the clock pulse (at 5Hz) for a 4017 counter, that could easily be modified for the basic stamp. With the basic stamp you could program the logic to get rid of the 4017 and you could use the random command to generate a pseudo-random number instead using a 555 for a clock pulse.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If you convince yourself that something is impossible before you even try; you are sure to prove yourself right.
  • GreyGrey Posts: 2
    edited 2010-04-28 00:41
    Thanks. Is there any that i can try using my 7-segment display on too? Just curious.
  • MikerocontrollerMikerocontroller Posts: 310
    edited 2010-04-28 08:29
    You can do this with your BS2 kit. I'm assuming you have the "What's a Microcontroller?" textbook. Most of what you need to know about the display is explained in chapter 6. Read about the OUTH command, LOOKUP command and RANDOM command. You will probably find these useful. Basically you generate a RANDOM number between 1-6, convert that number into the proper OUTH command using a LOOKUP table and display the result.
Sign In or Register to comment.