ESP32 + Micro-ROS + Husarnet demo
Prerequisites
Install Visual Studio Code with PlatformIO extension.
Clone the repo and open it in Visual Studio Code. Platformio should automatically install all project dependencies
-
In a
demo/
folder rename.env.template
to.env
and place Husarnet Join Code here (you will findyour Husarnet Join Code at https://app.husarnet.com). -
Launch
micro-ROS agent
(TCPv6 on port 8888),listener
(from demo_nodes_cpp) and Husarnet container for VPN connectivity:
cd demo
docker-compose up
-
Rename
credentials-template.h
tocredentials.h
and type your WiFi an Husarnet Join Code here (the same as in.env
file before) -
Click "PlatformIO: upload" button to flash your ESP32 board connected to your laptop. You will find the following log in the serial monitor:
************************************** micro-ROS + Husarnet example ************************************** 📻 1. Connecting to: FreeWifi Wi-Fi network . done ⌛ 2. Waiting for Husarnet to be ready ........ done Known hosts: esp32-talker (fc94:4050:1fc5:dc02:d27f:97b9:7f13:e215) master (fc94:4050:1fc5:dc02:d27f:97b9:7f13:e215) microros-agent (fc94:ffd0:3cd7:d104:2917:ae5c:a719:9e71)
-
Connect ESP32 to your laptop
-
Install platformio CLI
pip install -U platformio
-
Make flash erase:
pio run --target erase
sudo tcpflow -p -c -i hnet0