do anyone have any idea how to convert the basic stamp code to arduino code because i have one and i want to convert it plz help.
' Test X Band Motion Detector.bs2
' Test to see the number of cycles the X Band Motion Detector
' sends in respons to motion.
' {$STAMP BS2} ' Module = BASIC Stamp 2
' {$PBASIC 2.5} ' Language = PBASIC 2.5
XbandEnPin PIN 9 ' Enable pin
XbandOutPin PIN 8 ' Output pin
HalfSecond CON 500 ' ms in 1/2 s delay
MoveThreshld CON 2 ' Motion threhold
cycles VAR Word ' Cycle counter
reps VAR Word ' Test repetitions
HIGH XbandEnPin ' Enable motion detector
FOR reps = 1 TO 360 ' Check for 3 minutes
COUNT XbandOutPin, HalfSecond, cycles ' Count OUT pin transitions
DEBUG HOME, "cycles = ", ' Display cycle count
DEC cycles, CLREOL
IF cycles > MoveThreshld THEN ' Display motion/no motion
DEBUG CR, "Motion detected!"
ELSE
DEBUG CR, "No motion", CLREOL
ENDIF
NEXT ' Repeat detection loop
LOW XbandEnPin ' Disable motion detector
DEBUG CR, "Test done, motion detector disabled." ' Display all done.
STOP ' Stop the program holding EN
' low