this post was submitted on 08 Feb 2025
64 points (100.0% liked)
Meshtastic
545 readers
2 users here now
A community to discuss Meshtastic (https://meshtastic.org/docs/introduction)
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
For sure. It is quite basic and I am not proud of the hacky method I used to "parse" the message, but it might be useful for someone looking for a simple way to interface with a meshtastic device over TCP (onReceive) and the Lemmy API (createPost).
On a side note, I love how python looks on lemmy. This is awesome! I really like the way you parse the message, its readable.
Im totally doing that to test out my node(s).
Great job on this. I may take some of this later.
Here is the weather code (fat fingered the name, cant be bothered to change): https://yuno.chrisco.me/git/michael/meshtastic_forceast/src/branch/main/main.py
Heavily influenced by something I found online a while back which I lost the reference to.
Im guessing you were a C/C# dev based on the function names.
Glad you like it :D
The ping is very useful. I know that there is a built-in range test, but sometimes I don't need the test to be on all the time, nor do I want to set the frequency too high. Actually.... This give me an idea, I can simply program a command to turn the range test off/on remotely.
That weather function is nice! The US makes available some nice weather APIs. I have a PinePhone and it has a weather module that relies on a US-based API, but I am not in the US. At least I can find out the weather in Oregon easily. I don't know if there is some similar API in the Netherlands.
I helped re-factor some C++-based micro-controller firmware recently and the original code was not following any convention, so I looked at a list of conventions and decided that 'lower camel case' looked like a nice one to pick. So, I have been developing a habit to stick to that. I do scientific r&d and only sometimes need to do a bit of programming, so I'm not sure if I'd call myself a dev!
You created code, congrats you are a "coder" ;)