n00bsauce Sentry Gun

Adam Dewicki

Seamus Kaye

Phillip Birch

DescriptionThe n00bsauce Sentry Gun is the next evolution in home and/or business defense.With the fact that it is fully automatic (for one shot), and auto fires and tracks a target, it alleviates the need for any personnel to work it. It combines two servo motors, one to turn the nerf gun and one to fire it, all on a tripod. It uses two photo resistors to track movement and a ping device to fire the gun.

if (cm <= 90) { myservo.write(5); // makes the other servo turn and fire the gun

myservo.write(90); delay(100); } else if (cm > 90) { // if distance is 90cm or less then it will turn the trigger servo myservo.write(5); } Serial.print(inches); Serial.print("in, "); Serial.print(cm); // sets the serial moniter to read inches as in and centimeters as Serial.print("cm"); // cm when the serial moniter reads it. Serial.println();

There were a number of problems that we encountered while working on our project that we had to solve. The thing we had the most problems with was the code and having to go over it again and again to figure out what was wrong and fix it. Another big problem we encountered which our entire project relied on was the Nerf gun. The first gun we had was a six shooter, the trigger on the gun ended up being to hard to pull back and so the servo wasn't strong enough to fire the gun. We ended up going back to plan A where Mr. Dickie origionally gave us a small Nerf gun that fires one plastic dart; you touch the trigger just the slightest and it fires, therefore the servo was able to fire it. The result of changing the guns though was a shorter distance in which we can shoot. So we fixed being able to shoot the gun, but then we weren't able to shoot as far. Another problem we came across was the photo resistors won't work unless the ping is plugged in, so there was no solution to that except to have both plugged in at the same time. We had a problem with the photo resistor where when the gun would turn, the gun would cast a shadow on the photo resistor and make it turn back. To solve this, we moved the photo resistors farther apart from each other and shortened the turning radius of the servo that turns the Nerf gun.

Potential ImprovementsIf we had the money we would use a better gun, better photo resitors, and more wires.