#The wakeup *may* happen fast enough so
1 messages ยท Page 1 of 1 (latest)
I tried that and its at around 2s until the pi is booted and recognize the input. Thats sadly to long.
Do you have any idea?
In the end it is gonna be a toy for my phone for my nephews. They press a button and it plays a custom voice message from someone. So pressing the button for 2 seconds to get a sound is to long
I could run it in a loop all the time, but that would probly draw the battery (2x AAA's atm) very fast
You could have an LED that shows it's awake. If you get no activity for a while (1 minute? 5 minutes?) you can go to sleep. In that case one has to press a button to wake it up (the LED will go on), and then press some button to actually play the sound.
I will look at the lack of pin info and see if it's easy to fix.
That was my first thought too. Not instantly shut it down.
If you can have a look, it would be awesome. Its a christmas gift, so I dont have thaaat much time left
maybe looking good...
๐ฅณ
which board is this?
I'll give you a build to try
guessing regular pico
@neat pelican try this and see if it reports the pin.
Can you tell me what the output should look like?
Since I have to disconnect and reconnect the pi to get it to a real deep sleep, I dont have any console output since the connection stops. So I cant print(alarm.wake_alarm.pin) . My only "output" is playing a sound if the of is true ๐
With if(alarm.wake_alarm.pin==board.GP16): I got a false. So that compare is wrong. I tried if(alarm.wake_alarm.pin is not None):and that yields true and plays a sound
looks like I can do that with Mu. I used Thonny before. But I always get board.GP0 as a result, does not matter what button I press
hmm, close but no cigar. I'll look over the code again and do some testing locally.
Thanks a lot!
ack; I wrote && instead of & when checking a bitmask. Try this:
It works "half" -.-
When I connect my pi to a pc, save the code, disconnect it, reconnect it (to get a full deep sleep cycle), it works. And I can see in the console that the right pin is printed.
If I connect a battery to the pi and does not connect it to my pc, it does not work again
connected to a battery its still None
thanks, this may reflect some limitation. At this point I'd say move to the "go to sleep after a little while" idea, since I'm not sure it can be fixed.
I'll do some testing but not right away.