Hello All,
For the benefit of everyone let me start over and explain the basics of what I am trying to accomplish.
I want to create a I. R. vision sytem for a drone that I am working on and I need to use a 30KHz signal to accomplish this because the drone is controlled by a 38KHz signal.
I need to develope code and a circuit which will allow me to generate a constant I. R. pulse at 30KHz so that my 30KHz I. R. receiver can detecte any one of 6 LEDs which pulse, again at 30KHz. (Only one LED will pulse at a time.)
From everyones comments it seems like there are a few ways to accomplish this but I am not experienced enough to be able to see through to the end solution to be able to decide which solution is the best for where I am as a novice programmer.
Raschemmel - To answer your question regarding PWM and the duty cycle... I believe that I need to employ PWM in order to, one achive a 30KHz pulse and two, in order to sustain this pulse in the background while I in turn search for that very signal. From my research I understand the PWM approximates a analog signal with a modulated square wave. Given this I think that I could use a 50% duty cycle without any issues. I chose 50% by default, I do not know that I could not use another duty cycle, 50% was just somewhere to start. All that I know for certain is that I need a 30KHz pulse. I am not sure that the duty cycle is an issue or the best way to generate the 30KHz pulses for that matter. I guess that is the point really and why I posted this question on the "Project Advise" board. I am new to all of this and as such I need help in determining the best course of action so that I can set off on trying to research and develop my project.
I hope that this helps and I truely appreciate everyones comments.
Also, I got Grumpy Mike's code running on my Uno, I am currently researching on how to swith it over to Pin 11.
Zeus