https://www.youtube.com/watch?v=bSz4FQPsir8
In case you want a nerdier way to make a cheap motion detecting squirt gun, Here’s how you can build your own with an Arduino and a PIR sensor!
- Raid Auto Trigger
- Arduino
- PIR Motion Sensor
- Diode
- NPN Transistor
- Wire cutters and wire
TOTAL COST: ~$45.00
const int pirPower = 13; const int pirIn = 12; int motorPin1 = 3;
void setup(){ pinMode(pirPower, OUTPUT); pinMode(pirIn, INPUT); pinMode(motorPin1, OUTPUT); digitalWrite(motorPin1, LOW); digitalWrite(pirPower, HIGH); } void loop(){ int value= digitalRead(pirIn); if (value == HIGH){ digitalWrite(motorPin1, HIGH); delay(500); digitalWrite(motorPin1, LOW); } }
Help support my channel: http://www.patreon.com/tinkernut Follow Tinkernut! Google + Facebook Twitter