Go Down

Topic: PWM Servo via IR (Read 6005 times) previous topic - next topic


Great stuff...

I think you have the movement figures a bit screwed. You don't need PSVal and PSPos as you have:

Code: [Select]
PanServoVal = PanServoMovement + PanServoPos;

PSMovement is always 15 and PSPos stays at 0 so you're always writing the same value I think. Debug it with some serial write of PSVal which is what the servo's getting and I think you'll see it doesn't change.

Try something like this:

Code: [Select]
PanServoPos = PanServoMovement + PanServoPos;

where now the written value changes each time thru.


BTW wth is this thing you're building... lasers? triggers?

Am I aiding and abetting some kind of Inter-Galalctic Star Wars thing here?  8)

My daughter is really keen to mount some kind of weaponry on her Magician. She's thinking Airsoft, I'm thinking more ping pong balls


Yea, I was viewing some tutorials and reading through some blogs, fourms and webpages while I was working hard at work today, lol. I saw something in there that I kind of liked for the math part of it. I will post it in the AM though, if you don't mind me picking your brain a little more, could you tell me if something like this would work in a sketch like this and why or why not it would or would not work. I'm trying to learn as much as I can and people that I know with the acception of one person looks at me like I have 3 eyes when I talk about anything related to my project.

Again, I can't thank you enough for all your help and patients with me. You're AWESOME and I hope to absorbe enough knowladge to be proficient in programming, to help people in the future. I have no formal background in any kind of electronics. However, due to my interests in them, I have come a long way since 2007. I find it to be very satisfying that I am self taught and people like you have been giving me the guidance in new ventures since I have started working on desktop computers back then, to BGA welding, and todays Arduino/C Programming . If it wasn't for people like you, I wouldn't be able to have a very nice extra income monthly, or extend my hobbies like this. I truly am greatful for your help, more than I can express. Thank you for everything. If you ever have any questions regarding PCs or re-flowing/ re-balling BGAs please let me know, I work on everything from Tvs to portable devices and if you ever want to run something by someone please let me help you, as payment for helping me with programming.

My 4 month old son woke up so I'm going to have to have to get at you in the AM! Thanks again!
What if Burt Reynolds, really changed his name to Turd Ferguson?


Well, I have always enjoyed shooting guns. Back in 2006 I had a unfortunate accident (cleaning up tree debris after hurricane Katrinain New Orleans) and I lost my right index finger so I have a problem shooting smaller handguns. I'm building this "IR turret" for a .25 caliber handgun that has been collecting dust since my accident. Honestly, the only reason why I started this is because I was loosing interest in learning how to do programming by making LEDs blink. So, I went looking around the house for something to make that would be very rewarding at the end of the project. I stubbled accross my hand gun collection and said "a turret for my. 25 would be pretty cool". Now, a month and a half later this is where I'm at. If you want to give me your email address, I will send you some pictures and or videos of my progress thus far (in the AM). I have removed the firing pin from the gun so it's safer until I get the project done and I will re-assemble the gun and bring it out to our land in the sticks, stand a good safe distance (hence the IR), and bangoff some rounds! I can't tell you how the anticipation of that day is just eating at me now. It has become an addiction, working on this with every spare moment I have. Lol! I have learned more in the month and a half, since the start of this project than I have playing with LEDs for the 3 months prior.
What if Burt Reynolds, really changed his name to Turd Ferguson?


Please tell me you're not trusting firearm safety to your programming skills
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.


Please tell me you're not trusting firearm safety to your programming skills

When you put it that way, you make this project sound very unsafe! HAHAHA! Well, where my lack of skills are in programing, I'm very confident in my hardware skills. I have put a lot of thought into this project in terms of safety. First of all the sides are labeled, and when the project goes live the sides that will be in the line of fire will be red, so if your able to see the red, it clearly is in the wrong position. With the servo only being able to reach 180 degrees you have 180 degrees of safety. Also, the servo that controls the trigger has a main power safety on it, where there is no power going to it at all until the safety is released, via the IR signal followed by another signal to pull the trigger. This was a thought in the event of any kind of EMS noise, or in the event the trigger button was pushed on accident. Both run off of relays that have an LED so you know the constant state of the safety and the position of the trigger servo at all times and will be clearly visible from 20 feet away where the shooter will be positioned. This clearly can be very unsafe if not used properly, and I have been shooting firearms and practicing safety since I was 8 years old, I come from a background of law enforcement and was taught at a very young age. I'm very confident in my construction and the measures of safety that I took thus far. If there is any kind of issue what-so-ever, the firing pin will never see the firearm while in the unit. This is not a toy and believe me I'm well aware of that, I'm not a kid and I know safety is a priority, this is why I'm taking my time on the project and making sure that everything is 100%. At any point I see this to be too unsafe, it will never be live. But truly, thank you for showing concern about my safety, believe me I'm much more concerned, for it's my one life I live.
What if Burt Reynolds, really changed his name to Turd Ferguson?

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131