| | Programming the RCX in VB
|
| I'm starting on the program for my Mindstorms robot and I had a question. What is the best way to get a random number using VB? At first glance I can find a register that appears to generate a random number between 1 and 32768, but how do I limit (...) (26 years ago, 2-Jan-99, to lugnet.robotics)
| | | | Re: Programming the RCX in VB
|
| John, here is an example how to create random numbers in VB. In the example below it will generate values between 1 and 6. The statement "Randomize" is initializing the Random Generator. The function "Rnd" is then used to get the random numbers. Dim (...) (26 years ago, 3-Jan-99, to lugnet.robotics)
| |