-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Script hanging / freezing #12
Comments
That's interesting. Which version of MicroPython are you running? |
I am using MicroPython 1.20. |
I've had the same problem using pi-pico. I raised the issue on the rpi forum, and had useful advice. AIUI:
The current tm1637 module uses delays of 10us when clocking the chip, and falls into the "more complex" arena. After changing to two separate delays of 5us to force a simple, if inefficient, spin, all has been well, and I've not experienced further issues. See: (And thanks for the code BTW. So good to have all the messy stuff neatly packaged!) |
Hello,
I was excperiencing some freezing / hanging behaviour with some tm1637 7-segment displays and this library on a Raspberry Pi Pico board.
I was able to fix it modifiyng your original library as follows:
replace all the "sleep_us" occurrencies with "time.sleep"
change the "TM1637_DELAY = const(10)" line with "TM1637_DELAY = const(0.00001)"
replace the "from time import sleep_us, sleep_ms" line to "import time"
I also changed the "sleep_ms(delay)" inside the scroll function with "time.sleep(delay)" and changed the original "delay=250" with "delay=0.250"
My script is now running since two days with no more freezings! I hope this helps.
The text was updated successfully, but these errors were encountered: