Adam Dewicki
Seamus Kaye
Phillip Birch
Description
The 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. Program Description
This part of the code sets the variables for the rest of the code.
This tells the ping what to do and how often to read, and it also tells the photo resistors when to turn and when it there is light or not.
Tells the serial monitor what to read, what to read them as, and how often to read it.
Complete Program
Problems Encountered and Solved
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 Improvements If we had the money we would use a better gun, better photo resitors, and more wires. |