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.
Fireballs
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- Jeepgurl99
- Posts: 1
- Joined: Sun Mar 26, 2023 3:51 pm
Fireballs
- Attachments
-
- maker-Fireball premade.uf2
- (354 KiB) Downloaded 9 times
-
- mycode-fireball.uf2
- (280 KiB) Downloaded 11 times
- firepixie
- Posts: 36
- Joined: Wed Sep 04, 2013 3:42 pm
Re: Fireballs
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
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 (326.13 KiB) Viewed 114 times
Please be positive and constructive with your questions and comments.