Controls:
UP = Button 1- MENU
A = Button 2 - SELECT
B = Button 3 - BACK
LEFT + B = Display Off
RIGHT + B = Display On
Changes made:
Move to Arduboy2 Library
Remove Wire + SPI Stuff
Convert & relocate Images
Edit Speaker pin
Framerate too fast
Migrate From Arduino Tone() to ArduboyTones
LED stuff
Print stuff (BLACK) -(WHITE)
Improve Button Handling
OLED Sleep
To Do:
More intereaction
Better handling for audio - Maybe Arduboy Beep
Improved Power saving
Before posting code the project uses GNU GPLv3. I am unsure what the best practise is,can I just provide the code I want to keep with my changes in my own git master with licence and link to the original authors? or do I have to fork and include all original code?
I doubt OLED sleep will get you much savings (relative to the overall system power), than just setting all pixels off would, but its easy to do since there are already Arduboy2 library functions to do it.
As you are probably aware, improved power saving for this sort of thing has been discussed here:
Thanks I have added displayOn/Off with button combos.
Thank you, I’m glad someone is enjoying it.
If you really want to show your appreciation there’s a “buy me a coffee” button on the original authors site (link in first post).
Initially replacing WIRE.h and SPI.h with the Arduboy2 library + adding arduboy. to most and changing the pins to correspond with my pro micro clone was pretty much enough to get it running with garbled graphics.
I had to convert of the images with Team a.r.g’s tool and remove the width+height to fix the image display issues.
All the Button pin stuff now removed to use arduboy.pressed()
Only pin 5 (speaker) temporarily remains.
The Library changes made a huge reduction in size. Before:
Sketch uses 32616 bytes (113%) of program storage space. After:
Sketch uses 26378 bytes (88%) of program storage space.
Improved input now using justPressed for all except the OLED on/off.
removed [WIP] from topic title - project has all features of original
I am able to put the system into PWR_DOWN and wake with the watchdog timer. But am struggling to figure out the interrupt using a button.
Looking at the watchdog timer it looks like I would have to wake every 8 seconds and increase a counter to extend sleep time and finally using an interrupt to wake and trigger events.
I thought I put a button on the same as a hardware interrupt pin but it looks like I gave that up for having a better bitmask for reading the buttons. Sorry!