Made a python script to create posts via meshtastic messages. If you can see this, the test worked! Posting from the park with no mobile data _

  • mesamune@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    11 hours ago

    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.

                if 'Ping' in message:
                    interface.sendText("Pong!", destinationId=sender)
    

    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.

    • Salamander@mander.xyzM
      link
      fedilink
      arrow-up
      3
      ·
      10 hours ago

      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.

      Im guessing you were a C/C# dev based on the function names.

      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!