Closed mariovisic closed 4 years ago
@makermelissa maybe check it still works on a feather m4 + wing in the next week or two? :)
I tried this out with a Feather M4 and both the mono and tri-color and neither worked. So then I tried the original code before this change and it didn't work for either display again, so I'll have to look into it further.
Ok! I got it working. It tested fine on both the mono and tri-color displays.
🙌 thank you so much :)
Thank you!
In many places a
pass
instruction is used in loops to wait until we hear back back from the display. This causes the loop to execute continuously which uses all of the available CPU, if we instead sleep for 1ms, we don't lose much time (less than 1ms each wait) and we dramatically reduce the load on the CPU.Before the change (updating a 3-color 2.13" display):
After the change:
The total time to run the script is about the same, but the CPU time has reduced dramatically.