#38

Canbus open your mind part3



Overview


Setting up Arduino IDE for LilyGO T-CAN485 involves understanding Linux (Mint), Arduino IDE, CANbus, and working with cheap hardware from China. The goal is to document the process for others to follow.

Parts


- LilyGO T-CAN485
- ESP32 Wrover module

Steps


1. Install Arduino IDE and add ESP32 support.
2. Connect the LilyGO T-CAN485 board to the computer.
3. Set up the board in Arduino IDE by selecting esp32 wrover module.
4. Test the board by running examples like SD_TEST and WiFiClient.
5. Ensure the correct baud rate (115200) is selected and use the Serial Monitor to view results.

Notes


- The board is identified through the GitHub repository: LilyGO T-CAN485.
- CANbus files can be found here: esp32-can-protocol-demo.
- Example code for CANbus is available here: CAN.ino.

Problem


When using V3 modules, the CAN.c file has an incorrect setting.

Solution


Change the line in CAN.c from:
`c
MODULE_CAN->IER.U = 0xff;
`
to:
`c
MODULE_CAN->IER.U = 0xef;
`

Summary


The process involves setting up the Arduino IDE for the LilyGO T-CAN485 board, testing the board with examples, and making necessary code adjustments for V3 modules.

Key Points


- Ensure correct board selection in Arduino IDE.
- Test the board with examples to confirm functionality.
- Adjust CAN.c file for V3 modules to avoid issues.
- Use Serial Monitor for debugging with the correct baud rate.
Log in or register to reply.