changed valuerange to 255 and tested device
This commit is contained in:
@ -8,6 +8,7 @@
|
||||
#define esc1pin 15
|
||||
#define esc2pin 13
|
||||
#define fallbackpin 36
|
||||
#define failsafeValue 127
|
||||
|
||||
|
||||
Servo esc1;
|
||||
@ -72,8 +73,8 @@ void setup() {
|
||||
|
||||
// Init escs, min and max value similar as Traxxas TQI 1100, 1900
|
||||
// chanel, minAngel, maxAngel, minPulseWidth, maxPulseWidth
|
||||
esc1.attach(esc1pin, 0, 0, 180, 1100, 1900);
|
||||
esc2.attach(esc2pin, 1, 0, 180, 1100, 1900);
|
||||
esc1.attach(esc1pin, 0, 0, 255, 1100, 1900);
|
||||
esc2.attach(esc2pin, 1, 0, 255, 1100, 1900);
|
||||
|
||||
//Set device in AP mode to begin with
|
||||
WiFi.mode(WIFI_AP);
|
||||
@ -103,7 +104,8 @@ void setup() {
|
||||
void loop() {
|
||||
if(millis() - lastPacket > CONNECTION_TIMEOUT ) {
|
||||
isConnected = false;
|
||||
int failsafeValue = map(analogRead(fallbackpin), 0, 4095, 0, 180);
|
||||
//int failsafeValue = map(analogRead(fallbackpin), 0, 4095, 0, 180);
|
||||
// Taking 127 because it should be the center value anyway
|
||||
writeServos(failsafeValue, failsafeValue);
|
||||
display.clear();
|
||||
char buf[25];
|
||||
|
Reference in New Issue
Block a user