10000 GitHub - vongomben/meshbot: Control *almost anything* with Meshtastic
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

vongomben/meshbot

Repository files navigation

meshbot v 0.1

Control almost anything with Meshtastic

serial

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 featured as a tutorial on hackster.

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 (optional)
  • a switch (optional)
  • two Xiao Grove Shields (for purely educational purposes - I'm getting old. You can skip them if you want to make you project tinyer and save money.
  • a Grove Micro Servo
  • a Grove Chainable LED
  • a Grove DHT20 Temperature and Humidity Sensor

Software side, we use:

1) Flashing Radio n° 1

Visit meshtastic web flasher and follow the instructions.

flashing

2) Configuring the Radio

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: RX 44, TX 43

configuring

Since I'm using the Xiao Grove Shields I'm also sharing this useful image of the pin mapping.

Xiao Grove Shield

3) Listening to the Serial Port using Protobuf from another Xiao

Let's connect the two boards in this way. Important TX is going to RX, and viceversa. Do not connect 3V3 for now.

serial

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.

special cable

After installed the 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.

This is the Arduino code --> proto-all.ino

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.

If you want to run this test (and poccibly hook up different sensors and actuators than the one I chose) the backbone is echobot.ino

echobot

Now we are going to add and test each individual sensor and actuator.

Lets test: both devices are in "longFast" and see each other.

final

Have fun!

Extra Chapter: Neopixels

Why haven't I used Neopixels? Well, I wanted in the first place, but I had problems in using them with the ESP32S3 (and the Xiao on which it's soldered).

Thanks to my friend Peter I was able to understand this was caused by the library, so I ditched (this time) Neopixel Library to go (back) to FastLED. Now it works but I was already finishing the project. More examples and tests soon!

About

Control *almost anything* with Meshtastic

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0