Is what I want to do posible
StampStumped
Posts: 7
I am I nubie, I have a basic stamp 2 and I want know if I will run into trouble with it if I try and to the following:
·
Start button pushed.
·
Beginning.
Look up next number on table, or generate a random number between 1 and 9
·
Each number will correspond to a Subroutine
·
Subroutines one 1 though 6 will all be the same. Each will ·turn on a light and drive one leg of an AND gate time and start a timer.· If a button is ·pushed before the timer goes to Zero then 1 is added to counter A. Program loops to the beginning
·
·Subroutines one 7 though 9 will all be the same. Each will ·turn on a light and drive one leg of an AND gate time and start a timer.· If a button is NOT pushed before the timer goes to Zero then 1 is added to counter B.· The program then loops back to the beginning.·
·
Does this look like something a stamp 2 will be able to do?· Would be easier if a got a different kind of stamp? ·Any direction would be helpful.· It seems like adding some kind of external timing circuit might make things easier, what do you all think.·
·
Start button pushed.
·
Beginning.
Look up next number on table, or generate a random number between 1 and 9
·
Each number will correspond to a Subroutine
·
Subroutines one 1 though 6 will all be the same. Each will ·turn on a light and drive one leg of an AND gate time and start a timer.· If a button is ·pushed before the timer goes to Zero then 1 is added to counter A. Program loops to the beginning
·
·Subroutines one 7 though 9 will all be the same. Each will ·turn on a light and drive one leg of an AND gate time and start a timer.· If a button is NOT pushed before the timer goes to Zero then 1 is added to counter B.· The program then loops back to the beginning.·
·
Does this look like something a stamp 2 will be able to do?· Would be easier if a got a different kind of stamp? ·Any direction would be helpful.· It seems like adding some kind of external timing circuit might make things easier, what do you all think.·
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
How many lights Nine?
How many AND gates, Nine?
How Many Timers, Nine?
How much time will be set on timers
Think about doing psudo code to help design the logic
For example
MainLoop:
Pick random Number X
Set timer X
Set pin X high to turn on one leg of and gate
timerloop:
countdown timer
if timer X=0 then
If X<7 then A=A+1
if x>6 then B=B+1
goto mainloop
endif
goto timerloop