diff --git a/platformio.ini b/platformio.ini index 6842bd7..0e25cf0 100644 --- a/platformio.ini +++ b/platformio.ini @@ -74,10 +74,10 @@ build_flags= -D PIN_BACKWARD=12 ; digital signal from Cheap Focer 2 if direction is backward -D PIN_BRAKE=13 ; digital signal from Cheap Focer 2 if electric motor brakes is on -D BUZPIN=38 ; PIN for Piezo buzzer for acoustic signals (e.g. battery warning) - -D BATTERY_PIN=33 ; analog input for battery monitor, connected to voltage divider + -D BATTERY_PIN=33 ; analog input for battery monitor, connected to voltage divider -D LIGHT_BAR_PIN=2 ; DIN of WS28xx for battery indicator - -D VESC_RX_PIN=9 ; UART RX to Cheap Focer 2, connent to TX on CF2 - -D VESC_TX_PIN=10 ; UART TX to Cheap Focer 2, connent to RX on CF2 + -D VESC_RX_PIN=44 ; UART RX to Cheap Focer 2, connent to TX on CF2 + -D VESC_TX_PIN=43 ; UART TX to Cheap Focer 2, connent to RX on CF2 -D CAN_TX_PIN=16 -D CAN_RX_PIN=17 -D ESP32S3 diff --git a/src/main.cpp b/src/main.cpp index a5195ea..f33ecb7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -84,9 +84,10 @@ void setup() { pinMode(PIN_BRAKE, INPUT); #endif -// vesc.begin(VESC_BAUD_RATE, SERIAL_8N1, VESC_RX_PIN, VESC_TX_PIN, false); delay(50); -#ifdef CANBUS_ENABLED +#ifndef CANBUS_ENABLED + vesc.begin(VESC_BAUD_RATE, SERIAL_8N1, VESC_RX_PIN, VESC_TX_PIN, false); +#else // initializes the CANBUS canbus->init(); #endif //CANBUS_ENABLED