From 12a162f42227bdeb424aaf92cf58fae1adf5aa44 Mon Sep 17 00:00:00 2001 From: Will Tatam Date: Sun, 28 Jul 2024 13:11:13 +0100 Subject: [PATCH] tmp --- sensor/src/sensor.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sensor/src/sensor.cpp b/sensor/src/sensor.cpp index 1455b26..adfdcda 100644 --- a/sensor/src/sensor.cpp +++ b/sensor/src/sensor.cpp @@ -71,12 +71,12 @@ int delayTime = DELAY_TIME_DEFAULT; //Adafruit_NeoPixel pixels(1, 4, NEO_GRB + NEO_KHZ800); #elif ESP32 -#define tub Serial2 -#define tubUART UART_NUM_2 -#define RX_PIN 19 -#define TX_PIN 23 +#define tub Serial1 +#define tubUART UART_NUM_1 +#define RX_PIN 17 +#define TX_PIN 16 #define RTS_PIN_DEF 22 // RS485 direction control, RequestToSend TX or RX, required for MAX485 board. -#define PIN_5_PIN_DEF 18 +#define PIN_5_PIN_DEF 21 #else SoftwareSerial tub; #define RX_PIN D6 @@ -929,7 +929,7 @@ void sendCommand() { if (sendBuffer.isEmpty()) { return; } - if((millis() - lastCmdTime) >= 400) { + if((millis() - lastCmdTime) >= 500) { lastCmdTime = millis(); commandPending = true; digitalWrite(RTS_PIN_DEF, HIGH);