Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Advice needed for LoRa

    Scheduled Pinned Locked Moved Support & Troubleshooting
    lopylorapytrackpython868mhz
    2 Posts 2 Posters 551 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      han
      last edited by

      Hello Pioneers,

      I am pretty new with the Pycom devices and I need some advice.
      I already did this project with an Arduino on WiFI and that worked well.

      With the Pytrack is the plan to monitor a led on the external pins. The duration of the blink time indicates a failure.
      This failure needs to be solved but I want to send a message that this failure has occurred.
      The transmission from this message I want to transmit over LoRa (Europe) with my Lopy.

      Battery capacity is there enough so deepsleep is not nessecary. If I use deepsleep, I would use the accelerometer for waking up the Lopy.

      I want advice how I should code the monitor length of the indication light and the transmit action.
      Should I use LoRa nvram save in the first cycle.
      And then with an if else statement define the length of the message in combination with nvram restore followed by a s.send(xxx)?
      Or is there a better tool to use for this?

      There are 7 or 8 different blink lengths.

      On the Arduino I used PulseLn and a Switch case, but I couldn`t found anything in the Pycom docs.

      Let me know.

      With kind regards, Han

      J 1 Reply Last reply Reply Quote 0
      • J Offline
        jcaron @han
        last edited by

        @han I think you're mixing up several different topics:

        • monitoring that LED (or rather the signal that drives that LED, I suppose?)
        • sleep issues
        • LoRa

        For the monitoring part, it depends on the lengths you are considering. You could probably simply use interrupts to detect when the signal goes up or low, and compute the time difference to find the length of the pulse.

        What kind of battery are you using? An active LoPy draws about 50 mA even when doing nothing, so even a 5000 mAh battery would only last 4 days without deep sleep.

        Light sleep would help you save a bit, but you would still be talking about days or weeks, not months, unless you really have a very large battery, or have an external power supply.

        If you don't use deep sleep you don't need to nvram_save/restore.

        If you do go to deep sleep, you'll need to wake on pin to wake up when the LED lights up, but you may have issues measuring the first pulse, so I hope it is repeated...

        1 Reply Last reply Reply Quote 0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • 1 / 1
        • First post
          Last post

        Pycom on Twitter

        Pycom