Skip to content

Support for nodemcu32_uart - #97

Draft
jwidess wants to merge 7 commits into
thankthemaker:masterfrom
jwidess:master
Draft

Support for nodemcu32_uart#97
jwidess wants to merge 7 commits into
thankthemaker:masterfrom
jwidess:master

Conversation

@jwidess

@jwidess jwidess commented Mar 17, 2025

Copy link
Copy Markdown

Added env for nodemcu32 UART to simplify env setup, #61

Added env for nodemcu32 UART
@jwidess

jwidess commented Mar 23, 2026

Copy link
Copy Markdown
Author

Reviewing this again, it looks like using the -D CANBUS_ENABLED flag alone is invalid and results in the following compilation error,

src/main.cpp: In function 'void setup()':
src/main.cpp:108:22: error: 'vesc' was not declared in this scope
     bleServer->init(&vesc);
                      ^~~~
src/main.cpp:108:22: note: suggested alternative: 'getc'
     bleServer->init(&vesc);
                      ^~~~
                      getc

Due to lines 37-39 in main.cpp and the #ifndef. I'll review this further and see how I was successfully building this for my nodemcu32 using only UART...

jwidess added 5 commits March 23, 2026 17:04
Removed leading underscores(_) from CAN_TX_PIN/CAN_RX_PIN in platformio.ini (now 26, 27) and simplified CanDevice.h GPIO macro to use these. Can't see a reason why the ESP32S3 had different `#ifndef`
Removed ` -D CANBUS_ENABLED` from UART variant.
Configurable VESC_UART_PORT macro (default 2) in config.h for the HardwareSerial in main.cpp instead of a hardcoded port. This allows for boards like the ESP32-C3.
Add preprocessor checks in main.cpp to enforce that CANBUS_ENABLED and CANBUS_ONLY are either both defined (CAN mode) or both undefined (UART mode). I'd like to eventually see if we can allow for just CANBUS_ENABLED to support a dual UART and CANBUS_ENABLED setup.
Added esp32c3_devkitm_1 support, both CAN and UART variants.
Updated GitHub Actions workflow to build and publish environments: esp32c3_devkitm_1, esp32c3_devkitm_1_uart, and nodemcu-32s_uart
@jwidess

jwidess commented Mar 24, 2026

Copy link
Copy Markdown
Author

Going to rework this PR to incorporate my new changes and supported boards. Still working on getting the ESP32-C3 working, currently running into a panic on the BleServer...

@jwidess
jwidess marked this pull request as draft March 24, 2026 04:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant