Announcement

Collapse
No announcement yet.

Limp/dead mode

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #46
    We start with lcd on, then take a look at loop speed in realtime while sending tons of data to lcd, next we go ahead and pull the lcd power line, then goto the monitor to see what happens. the "timeout" is printed by the library during debugging, as you see, during this tineout, the main loop didnt do any random printing of digits to the serial monitor. this resulted in the whole loop being flatlined and unresponsive. as you see in the debugging, after the timeouts accumulated to the limit consecutively, the library shut itself off and there was no more genie processing being done, at all, and restored full functionality of the mcu, we didnt even need to disable any writeobjects or readobjects in your sketch, they are simply ignored until the library "wakes up". This is all inline and automatic and doesnt need you to implement extra code in your sketch either. I then go and connect the lcd, notice the loop is still running full speed while all genie reads or writes are ignored. the lcd will show no movement while loop still runs uninterrupted. Great. I setup a digitalRead as an example to trigger the library wakeup, once i grounded the pin, library woke up and immediately started showing data!

    https://www.youtube.com/watch?v=C4WA...ature=youtu.be

    the self-disable-library will look for consecutive timeouts, one after the next, if you had a timeout here or there that was just a glitch, no problem, the moment the link gets idle or a response without a timeout on next command, the counter is reset automatically, so unless it times out 20 times *in a row* it wont disable itself.

    Without this the library will do an internal timeout error stock 1sec interval, mod 100ms intervals, blocking, and your loop cycle will drop exponentially, if not creep to a total stop. This is a great solution if I ever need to take the lcd out for programming without having my project creep to a total stop because it's not connected.
    Last edited by tonton81; 25th February 2017, 09:59 AM.

    Comment


    • #47
      here is the results, i just transfered the lcd code and library over to my project
      on the lcd screen if you see, most if not all icons are gone, by default they will show when lcd is powered up. this is to show the one shot trigger is working successfully.
      if you take a look closely you'll see it come on by default and blip off right away as the library issues the one shot trigger on a successful ACK response that appears after any NAK.

      As I move the iphone over to the tablet, I printed a few details to the monitor, at what millisecs before the mcu sent the one-shot update to the lcd when the lcd was ready.

      tablet shows:
      time of wakup ms
      time of lcd ready ms (ack response confirmed), and issue a one time update of icons, etc
      total time in between wake up to ready mode


      please turn down your speakers, i dont know why the iphone7plus?? is so sound sensitive lol

      https://www.youtube.com/watch?v=DtY_...ature=youtu.be

      Comment

      Working...
      X