Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Troubleshooting
  3. Arduino Leonardo serial port and MySensors sleep

Arduino Leonardo serial port and MySensors sleep

Scheduled Pinned Locked Moved Troubleshooting
sleepleonardo
4 Posts 2 Posters 3.5k Views 1 Watching
  • 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.
  • D Offline
    D Offline
    doctor64
    wrote on last edited by
    #1

    Hello!

    I try to use Leonardo for my sensor development and encounter strange problem:
    Sensor successfully initialized, perform first loop, and after entering sleep() never come back, TX LED on Leonardo constantly lights.
    Anybody have an idea? Replacing sleep() with delay() solves the problem, but i fear what sensor can lost packets from gateway during sleep.

    Arduino 1.6.0, MySensors library 1.4.1
    demo code
    https://codebender.cc/sketch:87221

    Sketch log:
    Starting
    sensor started, id 105
    send: 105-105-0-0 s=255,c=0,t=17,pt=0,l=5,st=ok:1.4.1
    send: 105-105-0-0 s=255,c=3,t=6,pt=1,l=1,st=ok:0
    into sleep

    D 1 Reply Last reply
    0
    • D doctor64

      Hello!

      I try to use Leonardo for my sensor development and encounter strange problem:
      Sensor successfully initialized, perform first loop, and after entering sleep() never come back, TX LED on Leonardo constantly lights.
      Anybody have an idea? Replacing sleep() with delay() solves the problem, but i fear what sensor can lost packets from gateway during sleep.

      Arduino 1.6.0, MySensors library 1.4.1
      demo code
      https://codebender.cc/sketch:87221

      Sketch log:
      Starting
      sensor started, id 105
      send: 105-105-0-0 s=255,c=0,t=17,pt=0,l=5,st=ok:1.4.1
      send: 105-105-0-0 s=255,c=3,t=6,pt=1,l=1,st=ok:0
      into sleep

      D Offline
      D Offline
      doctor64
      wrote on last edited by
      #2

      @doctor64
      Just note if anybody try to test: after the bug it is unable to upload new sketches until reset - disconnect your Leonardo from USB, close Arduino GUI, reconnect Leonardo and start Arduino GUI

      1 Reply Last reply
      0
      • hekH Offline
        hekH Offline
        hek
        Admin
        wrote on last edited by
        #3

        I have never tested the Leonardo board. A good starting point would be to check if the LowPower library used supports it.

        https://github.com/mysensors/Arduino/blob/master/libraries/MySensors/utility/LowPower.cpp

        D 1 Reply Last reply
        0
        • hekH hek

          I have never tested the Leonardo board. A good starting point would be to check if the LowPower library used supports it.

          https://github.com/mysensors/Arduino/blob/master/libraries/MySensors/utility/LowPower.cpp

          D Offline
          D Offline
          doctor64
          wrote on last edited by
          #4

          @hek Accordingly to LowPower library documentation, library support Atmega32U4 processor, so should work on Leonardo.
          Look's like i need to investigate deeper.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          11

          Online

          11.7k

          Users

          11.2k

          Topics

          113.1k

          Posts


          Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • MySensors
          • OpenHardware.io
          • Categories
          • Recent
          • Tags
          • Popular