Fireballs

Play with it! Please tell us which board you're using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Jeepgurl99
 
Posts: 1
Joined: Sun Mar 26, 2023 3:51 pm

Fireballs

Post by Jeepgurl99 »

This is my first Adafruit project and I am trying to follow the directions for the motion sensing fireball found here: https://cdn-learn.adafruit.com/download ... ensing.pdf

When us the premade code everything works great. However since I'm trying to learn I followed the steps to replicated it and am getting stuck. After I shake the playground express I get the desired flare up and then everything goes dark and stays dark. When I use the premade code I don't have this problem but for the life of me I can't figure out where the difference between the premade and the one I made is. Any help would be greatly appreciated.
Attachments
maker-Fireball premade.uf2
(354 KiB) Downloaded 2 times
mycode-fireball.uf2
(280 KiB) Downloaded 3 times

User avatar
firepixie
 
Posts: 36
Joined: Wed Sep 04, 2013 3:42 pm

Re: Fireballs

Post by firepixie »

Hi Jeepgurl,

I had the same thing happen with your code - weird. I fixed it by adding an instance of "set bright to 255" to the beginning of the Forever loop.

I'm not sure why it works in my code and not yours, but I suspect it's because MakeCode had an update that broke something. The problem was that the brightness was being taken down to 0 in the "on shake" block but the only time it was reset to 255 was on startup.

Thanks for reporting this, I'll update the guide so it works as written!

-Erin
Attachments
Adafruit_Circuit_Playground_Express_-_Blocks___Javascript_editor.jpg
Adafruit_Circuit_Playground_Express_-_Blocks___Javascript_editor.jpg (326.13 KiB) Viewed 111 times

Locked
Please be positive and constructive with your questions and comments.

Return to “Circuit Playground Classic, Circuit Playground Express, Circuit Playground Bluefruit”