Hi SpiderKenny,
Sorry for the delay in my response
So I think I have a better understanding of what needs to be done but I have a few more questions:
- How do I know the frequency of the PWM pins?
- Do all PWM pins have the same frequency?
- Is it possible to test what frequency is being outputted?
- Do I use digital write? Analogue write?
- If using the PWM I assume I would be use analogueWrite() function?
Here's what I'm thinking:
For the first part of the command pulse, the signal is on for 2mS and off for 28mS.
// Psudo code:
// Set Frequency - assuming 62.5KHz:
// (62.5 / 2) = 31250KHz
setPwmFrequency(9, 2);
:
:
digitalWrite(9, HIGH)
delay 2mS
digitalWrite(9, LOW)
delay 28mS
:
:
Let me know what you think and thanks again for the help!