I’m struggling getting the Arduino talk to my ESCape. Here’s my setup:
- Two ESCapes connected via CANBUS and powered off 12s battery.
- VESC Tool config:
- PPM and UART
- 115200 UART baud rate
- pin out ESCAPE - Arduino 5V - Vin GND - GND TX - RX RX - TX
I tried to narrow down the problem as much as possible. Here’s the code I’m using:
The send_packet function I copied and slightly modified from ESP8266VESC lib.
Then I merely count the received bytes and indicate the status using the Arduino’s builtin LED. If at least one byte is received, there should be one long blink. Otherwise, there are three short blinks.
The RX/TX LEDs on the Arduino do not blink at all, so I suppose this is a HW problem rather? I have read through the discussion here, but it didn’t help me.
As I understood, the TX/RX on the ESCape is 3.3V and thus it may be necessary to use a voltage divider for the RX. On the other hand, @stewii said that “most IO pins on the STM are 5V tolerant” so the voltage divider is not necessary.
Here’s a quick vid showing how things are wired up and how LEDs blink (or not):
Any help, please?
Update: It apparently takes writing a long post for one to figure out the problem himself. I’m not updating the
count variable in my
After fixing that bug, I’m getting long LED blinks now. Looks like I’m getting somewhere.