Hi im trying to make this so that user inputs a number of pulses which will show on a led.However i want an option for the last num of pulses entered to be saved in memory so that if two buttons are press at the same time it will show this.
Im using a picaxe 18 m btw.
Please give some ideas and examples on how to use write and read ?
thanks
Im using a picaxe 18 m btw.
Please give some ideas and examples on how to use write and read ?
thanks
Code:
symbol times = b0'pulses
symbol c = b3 'counter
main:
let times = 0
do
'counts how many flashes you want
if pin3 = 1 then inc times : pause 100
'if two buttons are pressed at same time causing high
else if pin5 = 1 and pin6 = 1 then pause 100
read times,b6
' *how to do *show last number of pulse inputed from before a reset
'break loop show number of flashes
else if pin4 = 1 and times > 0 then
pause 100
exit
else if pin1 = 0 then
pause 200
goto main
endif
loop
write b6,times
for c = 1 to times
high 2
pause 700
low 2
pause 700
next c
pause 300
goto main