I have a bug with the arduino 1.0.1 IDE
I have 2 brushless controllers, which require 1-2ms of pulses.
So i write BLDC_us=1500; and I get nothing, so I measured with digital signal osciloscope, and it was actually 2000us. Now I have to use Kproportional=0.75 to change it. In software 1500*0.75=1125
Well I dont like this anyway it consumes my time.

Please help to fix the delayMicroseconds() function
#include <IRremote.h>
#define TSOPG 49
#define TSOPV 51
#define RECV 53
#define UP 0x2C9B //Inflate duty cycle, as button T
#define DOWN 0x6C9B //Deflate duty cycle, as button W
#define POWER 0x4C9D //Turn off 0 as RED "Power" button
#define BLDC 12
int BLDC_us=1125; //1125/0.75=1500us
IRrecv irrecv(RECV);
decode_results results;
void setup() {
pinMode(TSOPG, OUTPUT);
pinMode(TSOPV, OUTPUT);
pinMode(RECV, INPUT);
pinMode(BLDC, OUTPUT);
digitalWrite(TSOPG, LOW);
digitalWrite(TSOPV, HIGH);
irrecv.enableIRIn(); //Start the IR receiver
}
void loop() {
if (irrecv.decode(&results)) {
switch (results.value) {
case UP : BLDC_us=constrain(BLDC_us+1,750,1500); break;
case DOWN : BLDC_us=constrain(BLDC_us-1,750,1500); break;
case POWER : BLDC_us=1125; break;
default: break;
}
irrecv.resume(); //Prepare to receive the next value
}
digitalWrite(BLDC, HIGH);
delayMicroseconds(BLDC_us);
digitalWrite(BLDC, LOW);
delayMicroseconds(BLDC_us);
}