Skip to content
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

Board not lighting up during config #10

Open
maxkozlov1 opened this issue Feb 10, 2023 · 24 comments
Open

Board not lighting up during config #10

maxkozlov1 opened this issue Feb 10, 2023 · 24 comments

Comments

@maxkozlov1
Copy link

Hello,

I was following your instructions and having success until I copied the src Python files into the CIRCUITPY root. The instructions said the board would light up with a loading screen, but my board stays totally black, even if I edit the config file. I tried resetting and following the instructions again to no avail. Would you have any suggestions?

Thanks!

@ScottKekoaShay
Copy link

Hi, did you ever resolve this? Same thing for me. I copied the (already extracted) files into the root dir, but the display is just blank.

@nategetu
Copy link

nategetu commented Mar 19, 2023

I had the same issue and was able to resolve by using an older version of CircuitPython (link here)

@maxkozlov1
Copy link
Author

Yep, same with me. After a month of use, I have a separate problem: sometimes the board gets stuck on the yellow light (pinging the server), and it stays stuck unless I reboot it. Have either of you experienced that, or would you know how to fix that?

Looks like it might be same issue described here: #3.

@ScottKekoaShay
Copy link

Thanks for the info! I figured that that was likely the case once I figured out how to debug the code and saw the library errors. I updated the library files and made some other minimal code changes and it is mostly working (I need to figure out how to push the headers down, they are cut off for some reason). And I am also trying to figure out how to switch TRAIN_GROUP back and forth so that it shows trains in both directions on an interval. Once I have everything working I will post here again (maybe the updated files will also resolve the other issues?).

@ScottKekoaShay
Copy link

OK, I figured out my issues and everything is working. I forked the code here: https://github.com/ScottKekoaShay/dc-metro You can see it working in the new gif in the README. I updated the libraries to be compatible with CiruitPython 8.0.4 and updated the code accordingly (there were a lot of little things to change, especially for getting it to display properly). I also added the capability of switching between 2 different destinations (as someone had also requested in an issue here). It will work that way by default (switching between train_group 1 and 2 (I also tested with a 3, but did not get anything for that...). You can keep it as one destination just by using the same train_group for both train_group_1 and train_group_2. Since I just completed this now, I can't attest to it being any more or less stable than the original version, but will update here if I run into any issues (and hopefully with how to resolve them). I am hoping the CircuitPython version and lib updates resolved those issues.

@AdequateAndy
Copy link

OK, I figured out my issues and everything is working. I forked the code here: https://github.com/ScottKekoaShay/dc-metro You can see it working in the new gif in the README. I updated the libraries to be compatible with CiruitPython 8.0.4 and updated the code accordingly (there were a lot of little things to change, especially for getting it to display properly). I also added the capability of switching between 2 different destinations (as someone had also requested in an issue here). It will work that way by default (switching between train_group 1 and 2 (I also tested with a 3, but did not get anything for that...). You can keep it as one destination just by using the same train_group for both train_group_1 and train_group_2. Since I just completed this now, I can't attest to it being any more or less stable than the original version, but will update here if I run into any issues (and hopefully with how to resolve them). I am hoping the CircuitPython version and lib updates resolved those issues.

Scott, how do I download the SCR files? When i drag and drop them into CIRCUITPY it just shows up as regular google chrome hyperlinks and not executable PY files? I must be doing something wrong

@ScottKekoaShay
Copy link

Scott, how do I download the SCR files? When i drag and drop them into CIRCUITPY it just shows up as regular google chrome hyperlinks and not executable PY files? I must be doing something wrong

You should be able to click the green <> Code button on the main page, then click Download ZIP to download all the files to your local drive, then extract them locally and copy them onto your CIRCUITPY drive. Is that what you already tried?

@cosmo-va
Copy link

cosmo-va commented Apr 1, 2023

I'm having the same issue with the the display remaining blank. I've gone through the solutions noted here with no luck so I'm kind of stuck. Any advice? Thanks!

@AdequateAndy
Copy link

Hey man, so I found out I was downloading the files incorrectly. You have to click the green <> to download the SCR files. After I did that it worked.

@maxkozlov1
Copy link
Author

Hey @ScottKekoaShay, your edits are great -- I love that it shows both directions. The program is crashing and showing this error every hour or so; are you seeing a similar problem? I wonder if it's the same problem that caused the original version to occasionally freeze (which I tried to remedy by connecting the board to a smart plug that resets the board every hour)>
PXL_20230403_220005181

@kyleplantholt
Copy link

kyleplantholt commented Apr 4, 2023

Hey @ScottKekoaShay, your edits are great -- I love that it shows both directions. The program is crashing and showing this error every hour or so; are you seeing a similar problem? I wonder if it's the same problem that caused the original version to occasionally freeze (which I tried to remedy by connecting the board to a smart plug that resets the board every hour)

I had this issue until I purchased a better power cable. I bought this one and now I have zero issues.
https://www.adafruit.com/product/4298

@ScottKekoaShay
Copy link

I haven't actually been running mine non-stop (I made it as a gift and have not yet given it). I will try running it all day some time this week and see if I get any errors. If I do, I will see if I can debug. And thanks for the tip, @kyleplantholt I see that one is 15.3 W. I think the minimum was 15 and bought a 20 W power supply. I'll let you all know if I encounter the same issue or not.

@maxkozlov1
Copy link
Author

maxkozlov1 commented Apr 4, 2023 via email

@maxkozlov1
Copy link
Author

maxkozlov1 commented Apr 7, 2023 via email

@rhyThmaTik
Copy link

rhyThmaTik commented Apr 24, 2023

I'm having the same issue with the the display remaining blank. I've gone through the solutions noted here with no luck so I'm kind of stuck. Any advice? Thanks!

Hey, so I was having the same issue and finally figured it out (for the most part). There is an error in the code attached to the config file (there is an extra apostrophe at the end of the internet ssid). Once I deleted that, the code worked fine, but my LED wouldn't light up....but that is because my Matrix portal was plugged into the output instead of the input. Fix the syntax in the code (by deleting the extra apostrophe after your internet ssid) and make sure your Matrix portal is plugged into the input (arrow points towards the middle of the LED display) and this should fix your problem. I am however still getting the similar crash error mentioned above, seemingly at random. This is even after buying the Raspberry Pi charger and using a smart electrical socket (that resets the outlet every hour). I attached images below for reference.
IMG_1911
(This is my Matrix improperly plugged into the OUTPUT)

Code Error
(Code error is highlighted in red.)

IMG_1953
(Working LED board with Metro display)

IMG_2189
(Random crash error)

I would love to know how to fix this crash error, if someone is able to figure it out!

@maxkozlov1
Copy link
Author

Looks like the same crash error I'm getting. I still haven't been able to figure out the cause — I've tried fiddling with the WiFi configuration and power supply and neither seem to be the culprit. It also appears to crash at irregular intervals, but on average every 30-45 minutes for me.

@fordan
Copy link

fordan commented Apr 24, 2023

In my troubleshooting it's issues with (or triggered in) the CircuitPython libraries; if you run the board connected to your computer you can see the traceback on the serial-via-USB console when it crashes. The Mu editor will automatically pick the right serial device if you click the Serial button, and when it crashes the traceback will be the last thing printed on console. For example, here is my most recent crash:

Retrieving data...Traceback (most recent call last):
  File "code.py", line 25, in <module>
  File "train_board.py", line 41, in refresh
  File "code.py", line 22, in <lambda>
  File "code.py", line 15, in refresh_trains
  File "metro_api.py", line 17, in fetch_train_predictions
  File "metro_api.py", line 23, in _fetch_train_predictions
  File "adafruit_portalbase/network.py", line 518, in fetch
  File "adafruit_requests.py", line 823, in get
  File "adafruit_requests.py", line 679, in request
  File "adafruit_esp32spi/adafruit_esp32spi_socket.py", line 138, in recv
  File "adafruit_esp32spi/adafruit_esp32spi_socket.py", line 210, in available
  File "adafruit_esp32spi/adafruit_esp32spi.py", line 776, in socket_available
  File "adafruit_esp32spi/adafruit_esp32spi.py", line 332, in _send_command_get_response
  File "adafruit_esp32spi/adafruit_esp32spi.py", line 299, in _wait_response_cmd
  File "adafruit_esp32spi/adafruit_esp32spi.py", line 278, in _wait_spi_char
TimeoutError: Timed out waiting for SPI char

I've been playing with the try/except pair in the _fetch_train_predictions method of the MetroApi class to add additional except'ed error types; you can get it to ignore errors, but I don't have a good grasp yet on which errors are short-term and ignorable and which should probably trigger a reset rather than a crash.

@RJPinVA
Copy link

RJPinVA commented Apr 24, 2023

Novice here using a macbook pro running Ventura. When I add the CircuitPython 6.2 file to MATRIXBOOT it changes the name to CIRCUITPY as described - but the files are already unzipped and configured as described above. But the board does not light up. I've tried using different versions of the Uf2 file and resetting the board but its the same thing each time. Any advice?
Screenshot 2023-04-24 at 2 32 59 PM

EDIT - I used the 8.0.4 file and pulled over @ScottKekoaShay files and the damn thing works. Thanks all!

@ees-dc
Copy link

ees-dc commented Apr 29, 2023

I am having this issue as well. I went back and diligently followed the fork that ScottKekoaShay generated, edited the config file, signed up for my API developer account, made the edits, and saw the board refresh, but it got stuck at loading and then pulls up the flamingo screen.

Edited to include the error number on my board is 394. Not sure if this is meaningful or not because I could not find information about it through research.

@enemes1
Copy link

enemes1 commented Apr 30, 2023

Below is my config file shared by ScottKekoaShay. I'm still not getting any response on my RGB and flashing red on the matrix portal. Does anyone see anything obvious I'm missing? (Network credentials and API edited for posting)

from adafruit_bitmap_font import bitmap_font

config = {
#########################
# Network Configuration #
#########################

# WIFI Network SSID
'wifi_ssid': 'xxxx',

# WIFI Password
'wifi_password': 'xxxx',

#########################
# Metro Configuration   #
#########################

# Metro Station Code
'metro_station_code': 'B03',

# Metro Train Groups
# If you only want 1 group to show up, use that code for both train_group_1 and train_group_2
'train_group_1': '1',
'train_group_2': '2',

# API Key for WMATA
'metro_api_key': 'xxxx',

#########################
# Other Values You      #
# Probably Shouldn't    #
# Touch                 #
#########################
'metro_api_url': 'https://api.wmata.com/StationPrediction.svc/json/GetPrediction/',
'metro_api_retries': 2,
'refresh_interval': 5, # 5 seconds is a good middle ground for updates, as the processor takes its sweet ol time

# Display Settings
'matrix_width': 64,
'num_trains': 3,
'font': bitmap_font.load_font('lib/5x7.bdf'),

'character_width': 5,
'character_height': 7,
'text_padding': 1,
'text_color': 0xFF7500,

'loading_destination_text': 'Loading',
'loading_min_text': '---',
'loading_line_color': 0xFF00FF, # Something something Purple Line joke

'heading_text': 'LN DEST   MIN',
'heading_color': 0xFF0000,

'train_line_height': 6,
'train_line_width': 2,

'min_label_characters': 3,
'destination_max_characters': 8,

}

@avitale1121
Copy link

avitale1121 commented May 25, 2023

I've tried every suggestion in this thread and am still having this issue. I followed the instructions of the original post and all I got was the status indicator flashing red twice every couple of seconds. Tried using the newer version, fixing the syntax error in the config.py file, and used CircuitPython 8.0.4 but got the same results. The only time something different happened was when I used the code from the original post with CircuitPython 6.2.0 which made the status indicator light up green for a few seconds and then quickly flash white 4 times, but still the display didn't turn on.

If someone could please give me suggestions on how I can get this to work I would really appreciate it. I've been trying to do this for a couple hours now and I'm getting close to just giving up.

@enemes1
Copy link

enemes1 commented Nov 29, 2023

I still haven't been able to get my board to work properly. I'm stuck with it not lighting up at all and I'd like to take a look again. Any suggestions are greatly appreciated.

@enemes1
Copy link

enemes1 commented May 7, 2024

Has anyone decided to revisit their project? I'm still not getting the board to function... even with ChatGPT's help. lol

@ees-dc
Copy link

ees-dc commented May 11, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests