Hoping somebody can help me here. I've got the magic band reader project wired and built and I'm having some problems with the button in circuitpython. Hoping somebody can help me troubleshoot this.
So what's happening is when I turn on the feather with everything hooked up I get LED and sound and the program is running and I get output in terminal that the code.py is running. I get sound of the wave files and I get the right colors on the LEDs. The problem is that it's just running in a loop and it's not being triggered by the RFID whiz.
I believe the issue is the setup button switch lines in code.py... but it could possibly be my wiring. I have the RFID whiz in A1 and ground. When I trigger the RFID whiz without the feather plugged into USB and all wired up I get 4 yellow blinks on the nanopixel on the feather
In serial output I get
Waiting for button press to continue then playing the wave file name then done and then it just loops again and again and again.
Does it like this loop whether I have the RFID with plugged in or not it just loops and loops and loops.
Any troubleshooting tips?
Magic band reader RFID wiz help plz
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- outletpro
- Posts: 3
- Joined: Fri Dec 02, 2022 2:16 pm
Re: Magic band reader RFID wiz help plz
It's not your wiring. I'm getting the same issue and posted a question about it as well. I noticed that when you scan an RFID chip, it's pausing the audio and the lights. It then continues looping again.
It seems like something is switched in the code to cause the opposite effect when powered up. I'll keep an eye on both of our posts in hopes of someone having a fix.
viewtopic.php?t=196631&hilit=magic+band ... 2c866e5c90
It seems like something is switched in the code to cause the opposite effect when powered up. I'll keep an eye on both of our posts in hopes of someone having a fix.
viewtopic.php?t=196631&hilit=magic+band ... 2c866e5c90
- Tom_d
- Posts: 9
- Joined: Wed Nov 09, 2022 8:09 pm
Re: Magic band reader RFID wiz help plz
That's may it help in somebody assisting me in troubleshooting...the RFID wiz...if I just leave the reader on the card and the green light is triggered on the RFID wiz like the switch is open on the wiz.. the looping of the entire program stops.
If the green light is not on on the RFID whiz then all it does is program loop.
If the green light is not on on the RFID whiz then all it does is program loop.
- Tom_d
- Posts: 9
- Joined: Wed Nov 09, 2022 8:09 pm
Re: Magic band reader RFID wiz help plz
Thanks so much! I'm glad I'm not crazy and I'm glad that I can follow a simple wiring diagram
- dastels
- Posts: 15831
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Magic band reader RFID wiz help plz
The logic on checking the button is wrong. Notice the input is set up with a pulldown which would indicate that the input is normally LOW/False and HIGH/True when triggered. Try changing the loop to:
Dave
Code: Select all
while True:
print("Waiting for button press to continue!")
while not button.value:
solid.animate()
play_wav(random.choice(sounds))
while audio.playing:
chase.animate()
print("Done!")
- outletpro
- Posts: 3
- Joined: Fri Dec 02, 2022 2:16 pm
Re: Magic band reader RFID wiz help plz
That worked for me! Thanks a for spotting that!!
I'll just have to adjust the timing for the audio a little bit but now this works when I use an RFID tag.
I'll just have to adjust the timing for the audio a little bit but now this works when I use an RFID tag.
dastels wrote: ↑Fri Dec 02, 2022 5:36 pm The logic on checking the button is wrong. Notice the input is set up with a pulldown which would indicate that the input is normally LOW/False and HIGH/True when triggered. Try changing the loop to:DaveCode: Select all
while True: print("Waiting for button press to continue!") while not button.value: solid.animate() play_wav(random.choice(sounds)) while audio.playing: chase.animate() print("Done!")
- Tom_d
- Posts: 9
- Joined: Wed Nov 09, 2022 8:09 pm
Re: Magic band reader RFID wiz help plz
Thanks for the loop code update script review! That did the trick there. The other two deviations on the instructions were as mentioned updating the led interval to .04 to get picked up, and trimming the LED strip down to 30 leds from the instructions of using 31 which was just slightly too big for the ring with wiring.
I've got my kit built and with magic bands it's working very well.
I did try the big stereo speaker with the intentions of using some custom song tracks but after converting the wav files to the required 22k and 16 bit format with audacity, the mono speaker really is the only way to go from the build specs.
If anyone has a walkthrough on adding the 8mb memory expansion to this build I'd love to add some more song clips to the feather. With the included 7ish mb on the main board I got about 10 3-5 second Disney song clips varying from 400k to 1.2ish mb. I do have the 8mb expansion in hand but I don't know how to wire it or get the disk space expanded.
I've got my kit built and with magic bands it's working very well.
I did try the big stereo speaker with the intentions of using some custom song tracks but after converting the wav files to the required 22k and 16 bit format with audacity, the mono speaker really is the only way to go from the build specs.
If anyone has a walkthrough on adding the 8mb memory expansion to this build I'd love to add some more song clips to the feather. With the included 7ish mb on the main board I got about 10 3-5 second Disney song clips varying from 400k to 1.2ish mb. I do have the 8mb expansion in hand but I don't know how to wire it or get the disk space expanded.
Please be positive and constructive with your questions and comments.