Thanks for the input everyone.
Peter,
Yes I have a 30KHz receiver so I do not have to worry about the mechanics of that portion, only how to incorporate it into my code.
I was thinking for using two pins per pair of LEDs and taking advantage of the fact that the LEDs are diodes and only run one way, but your idea will sounds like it would simplify the code and possibly the demands on the CPU? How does connecting them to a common node simplify the pulse generation? I can see how it would reduce the size of the code but after that I loose it.
I am still having trouble identifying which functions to employ in order to integrate the receiver code. Right now the plan is to modulate the LEDs (hard code or PWM?) and then I am lost. Do I need PWM running in the background so that I can in parallel scan for the pulse, and then use an interrupt to send the detection signal out? And if I do handle the LEDs with PWM will this also be able to handle a loop which cycles through all 6 LEDs while running in the background and scanning in the foreground?
Grumpy Mike,
Very excited to review your code. It is a bit beyond me right now but I learn by example so this is very helpful, thank you. If I understand you correctly it seems that I should be able to add a counter loop to you code and cycle through my LEDs. My understanding up until now was that this could not be done as it amounted to threading which the Arduinos cannot do, so clearly there is something I am missing here.
Also thanks for the info about the receive needing time between LEDs. I did not realize that the receiver hardware what that sophisticated.
Raschemmel,
I suspect that the code does not compile bacause it is only a portion of my overall program. It compiles when in the body of my larger program. What I should have said is that I was having trouble understanding that particular bit of code, sorry about the confusion. No I have not been able to get it functioning yet. I can get one LED to flash at what I believe is 30KHz but I cannot achieve this with PWM yet. I am getting closer though.
Thanks everyone,
Zeus