I'm working on a project ( a quadcopter). the brushless DC motors are driven by an Electronic Speed controller which drives the motors at varying speeds depending upon the PWM values inputted to the ESC. I'm varying the pwm by means of a visual studio application that i designed.
So, basically, PC-->arduino dumilanalov-->RF transmitter --- RF receiver-->arduino dumilanalov-->ESC-->brushless DC motor
The motor starts when i gradually increase the pwm. When i tried using pwm pins 3 and 11, the motor worked perfectly, but pins 5 and 6 didn't seem to work. So i tried connecting an LED to it. But the LED responded correctly. VirtualWire(the library i used for the wireless communication) takes over Arduino Timer1, and this will affect the PWM capabilities of the digital pins 9 and 10.
In the arduino reference page, it is given
Notes and Known Issues
The PWM outputs generated on pins 5 and 6 will have higher-than-expected duty cycles. This is because of interactions with the millis() and delay() functions, which share the same internal timer used to generate those PWM outputs. This will be noticed mostly on low duty-cycle settings (e.g 0 - 10) and may result in a value of 0 not fully turning off the output on pins 5 and 6.
Here is code on the receiver arduino,
const int pin=5;
void setup() //reception-12, motor-3
vw_rx_start(); //start the PLL running
uint8_t buflen = VW_MAX_MESSAGE_LEN;
if (vw_get_message(buf, &buflen))
if(strcmp(msg,start)==0) // checking for an input from PC for automatic start