Well I’m unsure if you were serious about this question, so here’s an explanation:
The Playdate SDK does not have support for controlling the LED on the lock button, but there’s a little exception when you think hard enough. When the device is taking microphone input, the LED lights up with a bright orange. Since barely anybody uses the microphone, not a lot of people realized, but since I was working on an app that heavily involved the microphone for like 3 months, I noticed very quickly. From there you just run pd.sound.micinput.startListening() for turning on the LED, and pd.sound.micinput.stopListening() to turn it off.
I hope you weren’t joking. Also, here’s basically the entire logic of it:
if pd.buttonJustPressed(pd.kButtonA) then
on = not on
if on then
playdate.sound.micinput.startListening()
gfx.clear(white)
gfx.setColor(black)
gfx.setDitherPattern(0.5, gfx.image.kDitherTypeBayer8x8)
gfx.fillTriangle(199, 109, 151, -1, 247, -1)
flashlight_on:draw(183, 93)
else
playdate.sound.micinput.stopListening()
gfx.clear(black)
flashlight_off:draw(183, 93)
end
end
← Return to application
Comments
Log in with itch.io to leave a comment.
how did you do this? =^0
Well I’m unsure if you were serious about this question, so here’s an explanation: The Playdate SDK does not have support for controlling the LED on the lock button, but there’s a little exception when you think hard enough. When the device is taking microphone input, the LED lights up with a bright orange. Since barely anybody uses the microphone, not a lot of people realized, but since I was working on an app that heavily involved the microphone for like 3 months, I noticed very quickly. From there you just run pd.sound.micinput.startListening() for turning on the LED, and pd.sound.micinput.stopListening() to turn it off.
I hope you weren’t joking. Also, here’s basically the entire logic of it:
i was serious
cool thank you =^}
Love it
Genius!
Really creative idea. This may just be the spooky season talking, but I would love if the flashlight was replaced with a lantern.
I might just do that when Inhave the time