Contributing to a project or a pool of knowledge is a great opportunity for learning.
When I saw a person asking for help with reading messages from a LORA device (LOng range RAdio) using python, I decided to take a crack at it.
I downloaded and installed the python module, opened up Visual Studio Code and started to explore.
I created a new python file on my PC and figured out how to auto-push it to the raspberry pi using SSH. This is all part of Visual Studio now. I am still learning, so I don't have all the phrasing down yet. Is it a module? An extension? Still working on that.
Reading through the Meshtastic-python documentation, I found a small example of how to connect to the device using Python (over a USB cable from the Pi) and start listening to packets as they arrive.
I added some print statements and a filter, because I really only wanted to see the payload. These little devices are quite chatty it turns out. They run in a mesh network and will relay messages back and forth from all devices in range.
Using the Android app, I sent a message out to the network. This is how it looks on the tiny 1 inch screen on my TTGO Meshtastic device:
Using my meshtalk.py program, this is what it the decoded message looks like:
My next task is to clean up this little bit of code and upload it to GITHub. Hopefully the next time somebody googles "how to receive Meshtastic messages using python" my expanded example will help them out.
I learned so much by taking on this simple task. If an old programmer like me can do that, you can too.