Morning project - laser beams !
I had the following on my desk:
- Raspberry Pi 2
- 2x cheap micro servos from ebay
- 3d printed pan tilt bracket: http://www.thingiverse.com/thing:171431
- cheap laser http://www.hobbytronics.co.uk/red-laser?keyword=laser
Would a standard pan & tilt arrangement with cheap ebay servos be fast enough to draw patterns with a laser ?
Standard thinking says "no", but only one way to find out is to try !
So the short answer is YES
(camera doesn't show it well, though its a clear square at low speed, until it speeds up into a wobbly circle - I'll do another video in the dark)
Code for a square in bash:
#!/bin/bash
SPEED=0.05
COUNTER=0
while [ $COUNTER -lt 30 ]; do
echo "0=95" > /dev/servoblaster
sleep $SPEED
echo "7=170" > /dev/servoblaster
sleep $SPEED
echo "0=110" > /dev/servoblaster
sleep $SPEED
echo "7=155" > /dev/servoblaster
sleep $SPEED
let COUNTER=COUNTER+1
done
I've also now got it to do wobbly numbers, 3, 2, 1, 0
... more code on github: https://github.com/mikerr/laserPOV
https://www.youtube.com/watch?v=08Y3KFHbBl0