LED Glasses Blinking power LED
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- steve220
- Posts: 36
- Joined: Sat Sep 16, 2017 10:52 pm
LED Glasses Blinking power LED
After coding a few things successfully with the LED glasses from ADABOX 020, when I plugged them in this morning, the red LED on the control board is blinking twice in a pattern. I rebooted the computer and reflashed circuitpython to the board, but still getting the same behavior. I pulled the sample googly eye rings project off the site and loaded it. It runs, but I'm getting really weird LED behavior and constant soft resets. I suspect either the accelerometer is acting up or the I2C bus is. Any thoughts on how to troubleshoot?
- dastels
- Posts: 15658
- Joined: Tue Oct 20, 2015 3:22 pm
Re: LED Glasses Blinking power LED
Can you post what you see in the REPL when the code runs? That should give a better idea of what's happening.
If you aren't familiar with using the REPL (or even just the serial connection), see
https://learn.adafruit.com/welcome-to-c ... al-console
https://learn.adafruit.com/welcome-to-c ... al-console
https://learn.adafruit.com/welcome-to-c ... n/the-repl
Further, you could change the final except block to output the exception information before reloading.
Dave
If you aren't familiar with using the REPL (or even just the serial connection), see
https://learn.adafruit.com/welcome-to-c ... al-console
https://learn.adafruit.com/welcome-to-c ... al-console
https://learn.adafruit.com/welcome-to-c ... n/the-repl
Further, you could change the final except block to output the exception information before reloading.
Code: Select all
except OSError as err:
print(err)
supervisor.reload()
- steve220
- Posts: 36
- Joined: Sat Sep 16, 2017 10:52 pm
Re: LED Glasses Blinking power LED
Here is what is in REPL when I ctrl-c
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Traceback (most recent call last):
File "code.py", line 107, in <module>
File "adafruit_is31fl3741/__init__.py", line 233, in show
KeyboardInterrupt:
Code done running.
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 7.0.0 on 2021-09-20; Adafruit LED Glasses Driver nRF52840 with nRF52840
>>>
>>>
I added the print command,but it seems it never gets there as the only thing I get in the serial console when it is running is the following in a never ending loop
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Code stopped by auto-reload.
soft reboot
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Code stopped by auto-reload.
soft reboot
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Traceback (most recent call last):
File "code.py", line 107, in <module>
File "adafruit_is31fl3741/__init__.py", line 233, in show
KeyboardInterrupt:
Code done running.
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 7.0.0 on 2021-09-20; Adafruit LED Glasses Driver nRF52840 with nRF52840
>>>
>>>
I added the print command,but it seems it never gets there as the only thing I get in the serial console when it is running is the following in a never ending loop
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Code stopped by auto-reload.
soft reboot
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Code stopped by auto-reload.
soft reboot
- dastels
- Posts: 15658
- Joined: Tue Oct 20, 2015 3:22 pm
Re: LED Glasses Blinking power LED
That tells us that it's not reloaded because it's getting an error... so reading the accelerometer over I2C is probably ok. The auto-reload reboots are caused by the same feature that lets you simply update the code files (or any file) and have it restart. Depending on your OS (I find Linux is pretty bad about it) you can see a lot of these as the OS pokes at the drive.
To turn that off use:
To turn it back on:
Turning it off will get rid of those
Dave
To turn that off use:
Code: Select all
import supervisor
supervisor.disable_autoreload()
Code: Select all
import supervisor
supervisor.enable_autoreload()
Code: Select all
Code stopped by auto-reload.
soft reboot
- steve220
- Posts: 36
- Joined: Sat Sep 16, 2017 10:52 pm
Re: LED Glasses Blinking power LED
Making some progress
supervisor.disable_autoreload() does indeed keep the restart loop from happening, however supervisor.enable_autoreload() doesn't restart the autoloading either from code or REPL. Of course, this means updating/saving the code has no effect until I reset the board.
Some additional discoveries - My Circuit Playground Express exhibits the exact same behavior now (constant soft starts). It didn't yesterday, so my guess is that there is something going on with my system that has caused this behavior. It happens regardless of the USB port I'm plugged into. I can read/write to the devices as well as other USB devices such as camera memory cards and USB drives, so the ports seem good.
When plugging the adafruit devices into another system, the behavior is normal.
I have no idea what changed between yesterday and today. Any thoughts?
supervisor.disable_autoreload() does indeed keep the restart loop from happening, however supervisor.enable_autoreload() doesn't restart the autoloading either from code or REPL. Of course, this means updating/saving the code has no effect until I reset the board.
Some additional discoveries - My Circuit Playground Express exhibits the exact same behavior now (constant soft starts). It didn't yesterday, so my guess is that there is something going on with my system that has caused this behavior. It happens regardless of the USB port I'm plugged into. I can read/write to the devices as well as other USB devices such as camera memory cards and USB drives, so the ports seem good.
When plugging the adafruit devices into another system, the behavior is normal.
I have no idea what changed between yesterday and today. Any thoughts?
- dastels
- Posts: 15658
- Joined: Tue Oct 20, 2015 3:22 pm
Re: LED Glasses Blinking power LED
That's odd. supervisor.enable_autoreload() shoudl restart the change->reload behavior.
It's not related to the USB port, it's the mounted USB drive/filesystem. Did you update the OS? Install new apps? Do something with anti-virus?
Dave
It's not related to the USB port, it's the mounted USB drive/filesystem. Did you update the OS? Install new apps? Do something with anti-virus?
Dave
- adafruit2
- Posts: 22148
- Joined: Fri Mar 11, 2005 7:36 pm
Re: LED Glasses Blinking power LED
another thing you can try: just reload one of the 'default' demos?
https://learn.adafruit.com/adafruit-eye ... e-lights-2
https://learn.adafruit.com/adafruit-eye ... e-lights-2
- steve220
- Posts: 36
- Joined: Sat Sep 16, 2017 10:52 pm
Re: LED Glasses Blinking power LED
Thanks. I had actually already tried one of the default demos and got the same behavior. There is some good news. I ditch circuitpython on the CPX and played around with using the arduino IDE. That worked great. Then I reloaded circuitpython and the board is now working normally. The weird thing is that the glasses are working fine now too. I have no idea what fixed the problem, but for now, all seems to be working. Your help is greatly appreciated!
- adafruit2
- Posts: 22148
- Joined: Fri Mar 11, 2005 7:36 pm
Re: LED Glasses Blinking power LED
hey - we'll take it :)
Please be positive and constructive with your questions and comments.