The basic idea of this project is to create a small bot capable of field operations, or even a very simple BBS (Bulletin board system) based on microntrollers. This project is on github as well (follow for updates)
What we need:- a meshtastic radio (I am using a XIAO ESP32S3 & Wio-SX1262 Kit for Meshtastic & LoRa
- a second radio from which to send data (paired with a cell phone) I'll be using a T1000E from Seeed
- a microcontroller (I used another Xiao ESP32S3 to receive protobuf data from the Meshtastic Radio and doing stuff)
- a voltage converter
- a switch
- two Xiao Grove Shields (for purely educational purposes - I'm getting old. You can skip them if you want to make you project tinier and save money.
- meshtastic web flasher
- meshtastic console
- Arduino IDE with ESP32 core
- Meshtastic's Protobuf library for Arduino
Visit meshtastic web flasher and follow the instructions.
While you can go on from here using the Android or iOS app, I'll stick with the meshtastic console. We are going to define its Serial pins (based on Xiao's pin mapping) and enable protobuf communication.
Since I'm using the Xiao Grove Shields I'm also sharing this useful image of the pin mapping.
Important: when you refer to pins in the Meshtastic settings, always refer to the ESP32S3 naming (GPIO01, GIPO02, GPIO44, etc...), when referring to them using the Arduino IDE and Seeeds libraries, use SEEEDs naming).
Let's connect the two boards in this way. Important TX is going to RX, and viceversa. Do not connect 3V3 for now.
In order to have a cable for the serial communication I changed a grove connector making it usable changing TX to RX and vice versa.
After we installed the Meshtastic Protobuf library, we can run this code in order to read whichever is passing via the serial and read all the nodes received in the serial port. Don't worry: we are going to fine tune this code in order to do less.
4) Meshbot Basic Tasks: The bot structure.Let's say we want the bot to react to 4 commands: /help, /servo, /red, /temp
- "/help" is gonna respond with all the messages
- "/servo" will trigger some Micro Servo movement
- "/red" will trigger a Chainable LED
- "/temp" will answer with the temperature and humidity perceived from Grove DHT20
In this scenario, you should be able to trigger these states via whichever command received. Obviously we could secure our system by specify which channel or sender to obey.
Please test all the sensors and actuators accordingly, letts wrapup the code now.
Here is the final version of the working Meshbot V 0.1!
Comments