Shop OBEX P1 Docs P2 Docs Learn Events
Help with MORE random opportunities. — Parallax Forums

Help with MORE random opportunities.

matthew024matthew024 Posts: 9
edited 2008-08-07 08:06 in Learn with BlocklyProp
I need help on how to increase the random function. I programed a dice with 7 LEDS and a pushbutton. It is a regular dice from one to six. When I turn on the BOE with BS2 and push the pushbutton, it always comes out to be six. I want it to be different when I turn it on. Please help me with the seeding concept!
································································· Any help will be appreciated.

Comments

  • FranklinFranklin Posts: 4,747
    edited 2008-07-18 15:22
    What is it you don't understand about seeding? Use something that will be different each time you start the game, like the time between when the game is powered up and when the button is pushed.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • SRLMSRLM Posts: 5,045
    edited 2008-08-07 08:06
    You could also use an photoresistor with an RCTIME command, and multiply that by the random number. The more randomness you get in there, the better. Eventually you may get to the most random number possible...
Sign In or Register to comment.