Merge pull request #46 from free-x/newboard/rs232

New Kits from M5
This commit is contained in:
Andreas Vogel 2022-11-15 17:41:31 +01:00 committed by GitHub
commit 9d3a9a9c0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 79 additions and 0 deletions

View File

@ -50,6 +50,20 @@ M5 Atom CAN with M5 RS485 Module
With this set up you get basically all the features from the plain AtomCAN and the Tal485 combined. You still can connect via USB but have the NMEA0183 connection in parallel. With this set up you get basically all the features from the plain AtomCAN and the Tal485 combined. You still can connect via USB but have the NMEA0183 connection in parallel.
M5 Atom RS485 with M5 CAN Unit
--------------------------------
* Hardware: [ATOM RS485](https://docs.m5stack.com/en/atom/atomic485) + [CAN Unit](http://docs.m5stack.com/en/unit/can)
* Prebuild Binary: m5stack-atom-rs485-canunit-all.bin
* Build Define: BOARD_M5ATOM_RS485_CANUNIT
* Power: 12V via RS485 Module or via USB
M5 Atom RS232 with M5 CAN Unit
--------------------------------
* Hardware: [ATOM RS232](https://docs.m5stack.com/en/atom/atomic232) + [CAN Unit](http://docs.m5stack.com/en/unit/can)
* Prebuild Binary: m5stack-atom-rs232-canunit-all.bin
* Build Define: BOARD_M5ATOM_RS232_CANUNIT
* Power: 12V via RS232 Module or via USB
M5 Stack Atom Canunit M5 Stack Atom Canunit
--------------------- ---------------------
* Hardware: [M5_ATOM](http://docs.m5stack.com/en/core/atom_lite) + [CAN Unit](http://docs.m5stack.com/en/unit/can) * Hardware: [M5_ATOM](http://docs.m5stack.com/en/core/atom_lite) + [CAN Unit](http://docs.m5stack.com/en/unit/can)

View File

@ -57,6 +57,52 @@
//brightness 0...255 //brightness 0...255
#define GWLED_BRIGHTNESS 64 #define GWLED_BRIGHTNESS 64
#endif #endif
#ifdef BOARD_M5ATOM_RS232_CANUNIT
#define ESP32_CAN_TX_PIN GPIO_NUM_26
#define ESP32_CAN_RX_PIN GPIO_NUM_32
//if using rs232
#define GWSERIAL_TX 19
#define GWSERIAL_RX 22
#define GWSERIAL_MODE "BI"
#define GWBUTTON_PIN GPIO_NUM_39
#define GWBUTTON_ACTIVE LOW
//if GWBUTTON_PULLUPDOWN we enable a pulup/pulldown
#define GWBUTTON_PULLUPDOWN
//led handling
//if we define GWLED_FASTNET the arduino fastnet lib is used
#define GWLED_FASTLED
#define GWLED_TYPE SK6812
//color schema for fastled
#define GWLED_SCHEMA GRB
#define GWLED_PIN GPIO_NUM_27
//brightness 0...255
#define GWLED_BRIGHTNESS 64
#endif
#ifdef BOARD_M5ATOM_RS485_CANUNIT
#define ESP32_CAN_TX_PIN GPIO_NUM_26
#define ESP32_CAN_RX_PIN GPIO_NUM_32
//if using rs232
#define GWSERIAL_TX 19
#define GWSERIAL_RX 22
#define GWSERIAL_MODE "UNI"
#define GWBUTTON_PIN GPIO_NUM_39
#define GWBUTTON_ACTIVE LOW
//if GWBUTTON_PULLUPDOWN we enable a pulup/pulldown
#define GWBUTTON_PULLUPDOWN
//led handling
//if we define GWLED_FASTNET the arduino fastnet lib is used
#define GWLED_FASTLED
#define GWLED_TYPE SK6812
//color schema for fastled
#define GWLED_SCHEMA GRB
#define GWLED_PIN GPIO_NUM_27
//brightness 0...255
#define GWLED_BRIGHTNESS 64
#endif
#ifdef BOARD_M5STICK_CANUNIT #ifdef BOARD_M5STICK_CANUNIT
#define ESP32_CAN_TX_PIN GPIO_NUM_32 #define ESP32_CAN_TX_PIN GPIO_NUM_32
#define ESP32_CAN_RX_PIN GPIO_NUM_33 #define ESP32_CAN_RX_PIN GPIO_NUM_33

View File

@ -59,6 +59,25 @@ build_flags =
upload_port = /dev/esp32 upload_port = /dev/esp32
upload_protocol = esptool upload_protocol = esptool
[env:m5stack-atom-rs232-canunit]
board = m5stack-atom
lib_deps = ${env.lib_deps}
build_flags =
-D BOARD_M5ATOM_RS232_CANUNIT
${env.build_flags}
upload_port = /dev/esp32
upload_protocol = esptool
[env:m5stack-atom-rs485-canunit]
board = m5stack-atom
lib_deps = ${env.lib_deps}
build_flags =
-D BOARD_M5ATOM_RS485_CANUNIT
${env.build_flags}
upload_port = /dev/esp32
upload_protocol = esptool
[env:m5stickc-atom-canunit] [env:m5stickc-atom-canunit]
board = m5stick-c board = m5stick-c
lib_deps = ${env.lib_deps} lib_deps = ${env.lib_deps}