Self-defense turret. Uses face detection and recognition to detect intruders and shoot them with a Nerf gun triggered by a servo motor. See this README.
| Nerf gun | Fisheye camera |
| Base | Servo trigger |
Pin connections as defined on rototron.
make exec PROGRAM=lcdEnable I2C with sudo raspi-config and increase the I2C baudrate dtparam=i2c_baudrate=1000000 in /boot/config.txt.
I also tried to add options i2c_bcm2708 baudrate=1000000 to /etc/modprobe.d/i2c.conf:
For Nema-17 12V 350mA: red-grey-blank-yellow-green
# Simple demonstration program
make exec PROGRAM=motor
# Manual keyboard controller - should probably execute from a shell on the Pi though
make exec PROGRAM=motor_remote_controlMay be a good idea to use a PWM controller to avoid jitter? Meanwhile, connect white to GPIO pin #18 and power/ground.
make exec PROGRAM=servoI adapted the pin connections from raspberrypi-spy. I used a MCP3008 and a 10K resistor as well and it worked fine.
make exec PROGRAM=flex_sensorI'm running Raspbian headless. So the selenium driver is installed as a pip dependency along virtual display:
pip install pyvirtualdisplay seleniumFirefox with Aptitude:
sudo apt-get install python-pip iceweasel xvfbAnd GeckoDriver by hand and we want a version compatible with IceWeasel. Since currently IceWeasel is ~ Firefox v52, you don't want to install GeckoDriver v0.19 which requires Firefox v55.
wget https://github.com/mozilla/geckodriver/releases/download/v0.16.1/geckodriver-v0.16.1-arm7hf.tar.gz
tar -zxvf geckodriver-v0.16.1-arm7hf.tar.gz
sudo mv geckodriver /usr/local/bin
rm geckodriver-v0.16.1-arm7hf.tar.gzmake exec PROGRAM=browser_drivermake exec PROGRAM=blinkmake exec PROGRAM=rgb_ledmake exec PROGRAM=vibratorFollow this pins setup.
make exec PROGRAM=rfid_writer
make exec PROGRAM=rfid_readerThe Pi may crash and restart unless it's got sufficient power. For the Pi3, 2.4A and 5.1V is good.
Card to image:
sudo dd if=/dev/rdisk2 of=raspberry-opencv.dmg bs=1mImage to card:
diskutil unmountDisk /dev/disk2
sudo newfs_msdos -F 16 /dev/disk2
sudo dd if=raspberry-opencv.dmg of=/dev/rdisk2 bs=1mNotes:
- Usage of raw disk rdisk2 and block size of 1M to improve copy speed dramatically (10-15x)
- Use Ctrl+T to show progress in the console
Check microphone connection:
lsusb
amixerRecord:
arecord -D plughw:1 --duration=10 -f cd -vv ~/rectest.wavPlay:
aplay ~/rectest.wav
# or
scp -r [email protected]:~/rectest.wav .
open rectest.wavTake a picture and check it:
raspistill -o ~/cam.jpg
scp -r [email protected]:~/cam.jpg .
open cam.jpgalsamixer