Sleep Mode for Gameboy Zero

General GBZ-related chat goes here. Share ideas, tips and tricks, or ask questions that don't fit into the hardware/software help forums.
Post Reply
oliver
Posts: 5
Joined: Fri Dec 30, 2016 9:52 am
Has thanked: 4 times
Been thanked: 2 times

Sleep Mode for Gameboy Zero

Post by oliver » Fri Dec 30, 2016 10:55 am

Hi,
I'm going to build a Gameboy Zero, and would like to include a sleep switch to turn off the buttons and screen. I would hopefully use kite's newest board( http://market.sudomod.com/kites-super-all-in-one-board/) but am open to other options. When it's done, I hope to have a switch on it like the Nintendo 2DS. Please add any ideas you have or links to similar projects.
Thanks!
-oliver
Attachments
IMG_0322.JPG
Here is the switch on my 2DS
IMG_0322.JPG (1.56 MiB) Viewed 5659 times
Last edited by oliver on Tue May 30, 2017 7:51 pm, edited 1 time in total.

User avatar
kite
Posts: 972
Joined: Thu May 12, 2016 4:30 am
Location: UK
Has thanked: 246 times
Been thanked: 361 times
Contact:

Re: Sleep Mode

Post by kite » Fri Dec 30, 2016 1:26 pm

Hi :) My AIO will allow you to turn off the backlight, and wifi, but the main issue you're going to have is that the Pi doesn't have a sleep state.. you could certainly implement something that would downclock the pi, disable all running processes and hopefully save some power.. but it's not going to be the same as putting a DS (or even a phone) to sleep as they implement CPU sleep states to really save power (which the Pi does not have)!
Stock clearance - CLOSED: viewtopic.php?f=38&t=12064
Kite's Mailing List: https://goo.gl/forms/e97uUvPOfUxPWdz82
Kite's FAQ: https://kiteretro.com/faq/


ImageImageImageImageImage

oliver
Posts: 5
Joined: Fri Dec 30, 2016 9:52 am
Has thanked: 4 times
Been thanked: 2 times

Re: Sleep Mode for Gameboy Zero

Post by oliver » Fri Dec 30, 2016 6:00 pm

kite wrote:Hi :) My AIO will allow you to turn off the backlight, and wifi, but the main issue you're going to have is that the Pi doesn't have a sleep state.. you could certainly implement something that would downclock the pi, disable all running processes and hopefully save some power.. but it's not going to be the same as putting a DS (or even a phone) to sleep as they implement CPU sleep states to really save power (which the Pi does not have)!
Would it be possible to make the buttons not work while sleep mode is activated, so the buttons couldn't get accidentally pressed? How would I turn off the backlights or disable the wifi? I don't have much raspberry pi experience, both with software and hardware so how would I disable the running processes? I really appreciate your help.
-oliver

User avatar
kite
Posts: 972
Joined: Thu May 12, 2016 4:30 am
Location: UK
Has thanked: 246 times
Been thanked: 361 times
Contact:

Re: Sleep Mode

Post by kite » Sat Dec 31, 2016 9:20 am

oliver wrote:Would it be possible to make the buttons not work while sleep mode is activated, so the buttons couldn't get accidentally pressed? How would I turn off the backlights or disable the wifi? I don't have much raspberry pi experience, both with software and hardware so how would I disable the running processes? I really appreciate your help.
-oliver
Yes, .. the buttons, wifi, and backlight are all controlled by the ATMEGA32u4 (Arduino) so you'd need to make changes there (e.g. ignore all buttons unless it's a special combo) .. also setting the Bl pin low and the WIFI pin low will turn off the BL and wifi (will make sense when i release the code soon)..

As for the Pi side, you'll need to have a script that is run in the background and co-ordinating with the ATMEGA32u4 to make sure everyone is in sync.. again I have some code that I'll release that is currently doing the battery bar icon thing, which runs in the background and communicates to the ATMEGA (so you can reuse all those bits).
Stock clearance - CLOSED: viewtopic.php?f=38&t=12064
Kite's Mailing List: https://goo.gl/forms/e97uUvPOfUxPWdz82
Kite's FAQ: https://kiteretro.com/faq/


ImageImageImageImageImage

oliver
Posts: 5
Joined: Fri Dec 30, 2016 9:52 am
Has thanked: 4 times
Been thanked: 2 times

Re: Sleep Mode for Gameboy Zero

Post by oliver » Mon Jan 02, 2017 12:44 pm

kite wrote: Yes, .. the buttons, wifi, and backlight are all controlled by the ATMEGA32u4 (Arduino) so you'd need to make changes there (e.g. ignore all buttons unless it's a special combo) .. also setting the Bl pin low and the WIFI pin low will turn off the BL and wifi (will make sense when i release the code soon)..

As for the Pi side, you'll need to have a script that is run in the background and co-ordinating with the ATMEGA32u4 to make sure everyone is in sync.. again I have some code that I'll release that is currently doing the battery bar icon thing, which runs in the background and communicates to the ATMEGA (so you can reuse all those bits).
Thanks for all the help with this, it should really help the battery last longer.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest