Skip to content

Commit

Permalink
Merge pull request #84 from thankthemaker/83-uart-not-working-on-resc…
Browse files Browse the repository at this point in the history
…ue-s3

Fixed GPIO mapping for UART (2) on Lolin Wemos s3 mini
  • Loading branch information
thankthemaker authored Nov 5, 2023
2 parents 8b83ebd + c0c1fa5 commit 03e1ab8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 03e1ab8

Please sign in to comment.