BS2 Laser Scanner
Armed with my new high-tech Waveshare laser sensor, it was time to update my 6 year old BS1 scanner project.
Edit: Attached BS2 code, although servo values are hard-coded and will certainly require tweaking. YCMV.

Edit: Attached BS2 code, although servo values are hard-coded and will certainly require tweaking. YCMV.




Comments
Kiddin'. Great application.
And why are you not on the Parallax payroll?....
I am getting paid, this is for SERVO magazine. Nice product placement, huh?
Besides, Ken takes good care of all of us.
Too bad my high-visibility projects are all lasers & fire. If they were safer, Parallax would be welcome to distribute kits.
Hard to believe isn't it, and people keep whining for more power and complexity.
The BS1 and BS2 should be required study for anyone wanting to get into the robotics hobby.
Erco keeps proving their merits and validity, in this crowded world of microcontroller choices.
' {$STAMP BS2} ' {$PBASIC 2.5} init: FOR B0=1 TO 15 ' move servos to top left PULSOUT 0,820 ' 850=left 750=center 650=right PULSOUT 1,716 ' 850=down 750=level 650=up PAUSE 20 NEXT main: FOR W1=716 TO 760 STEP 2 'top to bottom FOR W0=820 TO 600 STEP 2 ' left to right IF W0<>820 THEN scan FOR B4=1 TO 7 PULSOUT 0,W0:PULSOUT 1,W1 ' pause to transit left PAUSE 20 NEXT scan: PULSOUT 0,W0:PULSOUT 1,W1 ' move PAUSE 10 PULSOUT 0,W0:PULSOUT 1,W1 ' move IF IN15=0 THEN DEBUG " " IF IN15=1 THEN DEBUG "W" NEXT DEBUG CR NEXThttps://www.ft.com/content/42985f40-f148-11e5-aff5-19b4e253664a