Random comand with the 08 motor driver???

wil0107_eiles

New Member
Hi just wondering if it is possible to use the random command with the 08 motor driver board??? (i know stupid question!!!) I just cannot get the random command to work with it!!! I have not used picaxe very much before as you have probably already worked out so any help is appreciated!!

this is the code i am trying to use:
Code:
main:
if pin3=1 then rand
goto main
rand:
high 1
random b2
pause b2
low 1
Thanks again!
 

hippy

Technical Support
Staff member
You need to use a word variable with RANDOM or it will choose only a very limited set of numbers, all of which are so low you probably don't see any effect.
 

tiscando

Senior Member
This is quite an annoying thing if you have limited number of variables.

random w1
pause b2
'this is much the same, but also touching variable b3, and it works.
 
Top