TinyScreen+ interrupts and sleeping.

gregweber

  • Jr. Member
  • **
    • Posts: 6
    • View Profile
Is there any working example code for putting the TinyScreen+ device to sleep and waking it up on button press?

The existing example code for the watch project doesn't seem to work (I think it is not up to date for the latest board revisions). I had to delete all the Bluetooth references since I am not adding a Bluetooth shield. With a few minor changes the program then works fine as long as I have it avoid going to sleep.


gregweber

  • Jr. Member
  • **
    • Posts: 6
    • View Profile
If I look at the schematic [1], it seems that the buttons are connected to pins 37, 38, 47, 48.
However, TinyScreen.h has the pin numbers as 19, 25, 30, 31 [2].
I am wondering if the TinyScreen library is outdated or if that is written for the shield instead of the +?

[1] https://github.com/TinyCircuits/TinyCircuits-TinyScreenPlus-ASM2022/raw/master/design_files/ASM2022_Rev4.pdf
[2] https://github.com/TinyCircuits/TinyCircuits-TinyScreen_Lib/blob/master/TinyScreen.h#L88
« Last Edit: November 11, 2019, 06:05:24 PM by gregweber »


lennevia

  • Administrator
  • Hero Member
  • *****
    • Posts: 437
    • View Profile
Hello,

After some review, it does seem that there might be an issue with the example. We will be looking into this!

In the meantime, there is a simple example attached to this reply for using external interrupts to wake the processor from sleep mode.

Best of luck,

RĂ©na


gregweber

  • Jr. Member
  • **
    • Posts: 6
    • View Profile
Thanks, that code example is super helpful! It seems to work.

Can you put the code on github? That way it is easy to stay up to date with changes and the community can help maintain the examples.. You can still post a download link here from github if you want to do that.



 

SMF spam blocked by CleanTalk