Adafruit_Learning_System_Guides icon indicating copy to clipboard operation
Adafruit_Learning_System_Guides copied to clipboard

3 issues with the HalloWing GPS Tour Guide project

Open jeremyharper opened this issue 3 years ago • 7 comments

I've been trying to get this project working and I ran into 3 bugs with the current version of the sample code. Apologies for not just putting in a pull request but I am super rusty at using git:

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/HalloWing_Tour_Guide/code.py

  1. On line 24, the timeout needs to be between 1 and 100 seconds (looks like this is sending it in ms, should change timeout to 3 instead of 3000)
  2. Lines 43-45, 81, and 84 throw a TFT_Backlight in use error. I had luck replacing it with board.DISPLAY.brightness = 0 and board.DISPLAY.brightness = 1 as appropriate
  3. I kept getting memory errors whenever it would attempt to play a wav file. Removing the debouncer library (reverting to the old code from November 12, 2018 for the switch instead) made it play fine.

I can't imagine that the debouncer library is THAT heavyweight of a library but it seems to be just enough to run the HalloWing out of memory.

jeremyharper avatar Jan 22 '22 23:01 jeremyharper

@dastels take a look?

ladyada avatar Jan 26 '22 05:01 ladyada

  1. You're right. I'd make the default 3.0 just to be clearer that it's a float.
  2. I'm not sure why it would already be in use. Unless there's been changes in displayio that grabs it. Seems unlikely since it's board specific and not display specific.
  3. What version of CircuitPython are you using? It simply may not fit on the M0 with more recent versions of CP and the libraries. It looks like it was originally written for CP3 back when I wrote it. (late 2018/early 2019).

dastels avatar Jan 26 '22 14:01 dastels

I checked busio and when this project was written the timeout was milliseconds as an int. I suspect that's the whole reason for the problems: itr was written for a previous version of CP and a lot has changed since then.

dastels avatar Jan 26 '22 14:01 dastels

@dastels ok wanna try it and see? if it doesnt fit it should be adaptable to an m4?

ladyada avatar Jan 26 '22 17:01 ladyada

I think you're right--I was using the latest version, CircuitPython 7.11.

That's probably the cause of issue 2 as well. It looks like according to this that the backlight control was moved into a different object at some point

jeremyharper avatar Jan 26 '22 17:01 jeremyharper

I'm having trouble finding the correct bundle. Only the latest 3.x version is linked. The appropriate CP doesn't seem to include displayio.

dastels avatar Jan 26 '22 19:01 dastels

right you need to move it to CP 7, we dont generate MPYs for earlier versions anymore

ladyada avatar Jan 26 '22 19:01 ladyada