if then syntax / servo control and photosensor
Archiver
Posts: 46,084
I am new and dont know the syntax well enough.
Please help if you can.
how would I write the Pbasic code in correct "syntax" ?
Photo1.Bs2
DO
get rctime
value from
photo1 sensor
compute:
if rc time value is
+ 2000 > than
zero, then DO YES
if no then DO NO
DO NO
Do Photo1.Bs2 LOOP again
DO YES
read "last stored
servo position"
from eprom address
compute:
add
"one pulsout value"
to
"last stored servo position"
save answer of computation
in eprom address
"last stored servo position"
then read that stored value
then PULSOUT that stored value.
LOOP
Thanks
Dave..
Please help if you can.
how would I write the Pbasic code in correct "syntax" ?
Photo1.Bs2
DO
get rctime
value from
photo1 sensor
compute:
if rc time value is
+ 2000 > than
zero, then DO YES
if no then DO NO
DO NO
Do Photo1.Bs2 LOOP again
DO YES
read "last stored
servo position"
from eprom address
compute:
add
"one pulsout value"
to
"last stored servo position"
save answer of computation
in eprom address
"last stored servo position"
then read that stored value
then PULSOUT that stored value.
LOOP
Thanks
Dave..