Skip to content

Commit 183a2d8

Browse files
etiennedmmcbridejc
authored andcommitted
doc(examples/esp-node): add a README
1 parent 3fe1acc commit 183a2d8

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

examples/esp-node/README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
This is a dummy CANopen node that runs on an ESP32C3 microcontroller.
2+
3+
# Prerequisite Tools
4+
5+
To flash the microcontroller through a USB-UART adapter the `espflash` utility is used as defined in `.cargo/config.toml`.
6+
Install it with:
7+
```bash
8+
cargo install cargo-espflash --locked
9+
```
10+
11+
You can check that the target device is detected:
12+
```bash
13+
espflash board-info
14+
```
15+
16+
# Build and Run
17+
Build the firmware and flash it to the target:
18+
```bash
19+
cargo run
20+
```
21+
22+
Bring up the CAN interface at 125kbit/s on your host computer:
23+
```bash
24+
sudo ip link set can0 up type can bitrate 125000
25+
```
26+
27+
Use the zencan CLI to scan for the ESP node:
28+
```bash
29+
cargo run --bin zencan-cli can0
30+
31+
can0>scan Nodes: 1
32+
Node 24: PreOperational
33+
Identity vendor: CAFE, product: 408, revision: 1, serial: FA186B18
34+
Device Name: 'esp-node'
35+
Versions: '001' SW, '1' HW
36+
Last Seen: 0s ago
37+
```

0 commit comments

Comments
 (0)