Hei
Fant denne koden og har modifisert så den funker, men skulle gjerne hatt 30% oppstart i 5-10 sek, før den gir bånn gass. Nå gir den bånn gass rett etter arming av ESC.
Har lagt inn int sppatupvalue som er ca 30%, men hvordan få den til å gå først 5 sek før speedvalue slår inn ?
// This sketch arms the Platinum ESC
int escPin = 9;
int arm = 1000; // pulse width in microseconds for arming
int startupvalue = 1300; //pulse width in microseconds for startup
int speedvalue = 1900; // pulse width in microseconds for operation
void setup()
{
// It appears that the ESC will accept a range of values for the arming
// sequence. This provides 10 pulses with a pulse width of 1000 us with
// with a 20 ms delay between pulses.
pinMode(escPin, OUTPUT);
for (int count = 0; count < 150; count++){
digitalWrite(escPin, HIGH);
delayMicroseconds(arm);
digitalWrite(escPin, LOW);
delay(20);
}
}
void loop()
{
// Once armed the ESC needs to receive a pulse train to operate the
// the motor. The motor speed is controlled by the duration of the
// pulse width.
// This simple loop provides a pulses width a width of 1350 us and a
// separation of 20 ms.
digitalWrite(escPin, HIGH);
delayMicroseconds(speedvalue);
digitalWrite(escPin, LOW);
delay(20);
}
Fant denne koden og har modifisert så den funker, men skulle gjerne hatt 30% oppstart i 5-10 sek, før den gir bånn gass. Nå gir den bånn gass rett etter arming av ESC.
Har lagt inn int sppatupvalue som er ca 30%, men hvordan få den til å gå først 5 sek før speedvalue slår inn ?
// This sketch arms the Platinum ESC
int escPin = 9;
int arm = 1000; // pulse width in microseconds for arming
int startupvalue = 1300; //pulse width in microseconds for startup
int speedvalue = 1900; // pulse width in microseconds for operation
void setup()
{
// It appears that the ESC will accept a range of values for the arming
// sequence. This provides 10 pulses with a pulse width of 1000 us with
// with a 20 ms delay between pulses.
pinMode(escPin, OUTPUT);
for (int count = 0; count < 150; count++){
digitalWrite(escPin, HIGH);
delayMicroseconds(arm);
digitalWrite(escPin, LOW);
delay(20);
}
}
void loop()
{
// Once armed the ESC needs to receive a pulse train to operate the
// the motor. The motor speed is controlled by the duration of the
// pulse width.
// This simple loop provides a pulses width a width of 1350 us and a
// separation of 20 ms.
digitalWrite(escPin, HIGH);
delayMicroseconds(speedvalue);
digitalWrite(escPin, LOW);
delay(20);
}