# Display for Train display

**URL:** <https://forums.balena.io/t/display-for-train-display/227402>\
**Category:** balenaSense\
**Created:** [December 22, 2020, 3:09pm UTC](https://forums.balena.io/t/display-for-train-display/227402 "2020-12-22T15:09:26Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![norskman](https://avatars.discourse-cdn.com/v4/letter/n/5fc32e/32.png) [@norskman](https://forums.balena.io/u/norskman)\
**Post date:** [December 22, 2020, 3:09pm UTC](https://forums.balena.io/t/display-for-train-display/227402/1 "2020-12-22T15:09:26Z")

</div>

Does anyone have a spare display that will work or can tell me where to buy one in the Uk.  
I did move the jumper and metered it - it was zero ohms.

I have double checked and buzzed out my wiring and thats ok too.

I bought 3 displays as recommended from the Ali Express site. But I am getting nothing on the display.  
I am sure its the display itself but cannot prove it yet.

My pi is showing in Balena and I am accessing the API as I am getting warning’s about the number of API’s calls being made per day!

I wanted to give the displays away as Christmas presents…but thats looking unlikely. But anyway if anyone can point me in the right direction that would be helpful

---

<div class="post-metadata">

**Author:** ![jtonello](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/jtonello/32/3246_2.png) [@jtonello](https://forums.balena.io/u/jtonello)\
**Post date:** [December 22, 2020, 10:10pm UTC](https://forums.balena.io/t/display-for-train-display/227402/4 "2020-12-22T22:10:49Z")

</div>

Hi Jack,

Can you provide some more detail about what you’re trying to build? What kind of RPi are you using? Are you connecting displays via on-board video? HDMI?

John

---

<div class="post-metadata">

**Author:** ![norskman](https://avatars.discourse-cdn.com/v4/letter/n/5fc32e/32.png) [@norskman](https://forums.balena.io/u/norskman)\
**Post date:** [December 24, 2020, 5:35pm UTC](https://forums.balena.io/t/display-for-train-display/227402/6 "2020-12-24T17:35:03Z")

</div>

Hi I am trying to make the RPI Zero work with the Train display project.

The RPi does hsow up correctly in the Balena page as being on-line and the output should show on my 2.8 inch OLED displays . But I get nothing on the display at all. I tired with 2 displays that I got from the same source.

It does not appear to be a wiring issue, I have checked the wiring a few times with a meter too - just to be sure its correct.

I am getting notes from the API web site warning me I am hitting their API alot. So thats good.

Just nothing on the display, so I decided its the display

I am NOT using the HDMI output on the pi. Never tried that.

---

<div class="post-metadata">

**Author:** ![dtischler](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/dtischler/32/2483_2.png) [@dtischler](https://forums.balena.io/u/dtischler)\
**Post date:** [December 24, 2020, 11:55pm UTC](https://forums.balena.io/t/display-for-train-display/227402/7 "2020-12-24T23:55:59Z")

</div>

Well, it might be worth trying to hook up to HDMI and see if there is any output there, as a good test.

Alternatively, I do have to wonder if you can somehow test the OLED displays themselves by simply flashing Raspbian to an SD Card and attempting to run some sample Python that makes use of the OLED. Double check that the units you received from AliExpress are in fact the correct part, which is an SSD1322 256x64. And if so, perhaps this will work to test it: [https://github.com/topherCantrell/ER-OLEDM032-1/blob/master/src/RPI\_OLED.py](https://github.com/topherCantrell/ER-OLEDM032-1/blob/master/src/RPI_OLED.py)

(Fair warning, I don’t have these parts, so, this is untested and just an idea).

🙂

---

<div class="post-metadata">

**Author:** ![norskman](https://avatars.discourse-cdn.com/v4/letter/n/5fc32e/32.png) [@norskman](https://forums.balena.io/u/norskman)\
**Post date:** [January 12, 2021, 1:24pm UTC](https://forums.balena.io/t/display-for-train-display/227402/9 "2021-01-12T13:24:55Z")

</div>

Do NOT be tempted to use slow memory cards.

I believe the combination of slow card and the slow wi-fi connectivity on the zero, means you will get time-outs when loading the app onto the memory card.

Better to use quality cards - they do not need to be large capacity.

Remember when switching cards to re-power the RPi - otheriwse the interface between the display and card will not be initialised correctly.

---

<div class="post-metadata">

**Author:** ![pipex](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/pipex/32/4840_2.png) [@pipex](https://forums.balena.io/u/pipex)\
**Post date:** [January 12, 2021, 6:13pm UTC](https://forums.balena.io/t/display-for-train-display/227402/10 "2021-01-12T18:13:51Z")

</div>

Hi Jack,

Could you perhaps elaborate a bit more? Was that the cause of the issue you were having? Maybe you could share the steps you followed to get the display working? Cheers.

---

<div class="post-metadata">

**Author:** ![norskman](https://avatars.discourse-cdn.com/v4/letter/n/5fc32e/32.png) [@norskman](https://forums.balena.io/u/norskman)\
**Post date:** [January 12, 2021, 6:41pm UTC](https://forums.balena.io/t/display-for-train-display/227402/12 "2021-01-12T18:41:13Z")

</div>

yes, the problem was reported on the Balena log file of:  
38852be7f64b025319209a0’ due to ‘connect ECONNREFUSED /var/run/balena-engine.sock’  
12.01.21 14:52:42 (+0000) Supervisor starting  
12.01.21 14:52:58 (+0000) Downloading image ‘[registry2.balena-cloud.com/v2/648472037786bd88388338795668e19e@sha256:166e52c6e43980e803cfa78cf0e768342974a40f438852be7f64b025319209a0](http://registry2.balena-cloud.com/v2/648472037786bd88388338795668e19e@sha256:166e52c6e43980e803cfa78cf0e768342974a40f438852be7f64b025319209a0)’  
12.01.21 14:58:09 (+0000) Failed to download image ‘[registry2.balena-cloud.com/v2/648472037786bd88388338795668e19e@sha256:166e52c6e43980e803cfa78cf0e768342974a40f438852be7f64b025319209a0](http://registry2.balena-cloud.com/v2/648472037786bd88388338795668e19e@sha256:166e52c6e43980e803cfa78cf0e768342974a40f438852be7f64b025319209a0)’ due to ‘connect ECONNREFUSED /var/run/balena-engine.sock’  
12.01.21 15:01:20 (+0000) Supervisor starting  
12.01.21 15:01:35 (+0000) Downloading image '[registry2.balena-cloud.com/v2/648472037786bd88388338795668e19e@sha256:166e52c6e43980e803cfa78cf0e768342974a40f438852be](http://registry2.balena-cloud.com/v2/648472037786bd88388338795668e19e@sha256:166e52c6e43980e803cfa78cf0e768342974a40f438852be)

I checked on my wifi dashboard and the connection was very slow.  
I expected slow connections as the RPi Zero does not support 5GHz connectivity.

I then tried using a good quality memory card ( Class 10 San disk Ultra) and the same hardware with the same connections between the OLED display, my wifi and the RPi Zero burst into life.

As I said before, the display did not come alive on its own, but required a power cycle to the RPi AND the display ( which is fed from the RPi anyway) to work.

Very very pleased with the result.

---

<div class="post-metadata">

**Author:** ![pipex](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/pipex/32/4840_2.png) [@pipex](https://forums.balena.io/u/pipex)\
**Post date:** [January 12, 2021, 6:53pm UTC](https://forums.balena.io/t/display-for-train-display/227402/13 "2021-01-12T18:53:00Z")

</div>

Oh, I see. Thank you for sharing the details. Glad you got it working!

I think your assesment is correct. Engine issues (the ECONNREFUSED error) can be caused by SD card errors, that is one of the reasons we recommend using [quality SD cards](https://www.balena.io/docs/learn/welcome/production-plan/#hardware).

Cheers

---

<div class="post-metadata">

**Author:** ![norskman](https://avatars.discourse-cdn.com/v4/letter/n/5fc32e/32.png) [@norskman](https://forums.balena.io/u/norskman)\
**Post date:** [January 19, 2021, 3:22pm UTC](https://forums.balena.io/t/display-for-train-display/227402/15 "2021-01-19T15:22:40Z")

</div>

Although I had everything working - something has changed and as I don’t have access to the code wondered what it actually meant:  
My RPi Zero is online and copies the original code over from the memory card.  
Upon rebooting I get this error - re-powering still gives this error - what does it mean?  
I have tried a few different RPi’s all doing the same thing. Tried re-formatting the memory card and re-downloading and burning with Etcher - still no luck.

The error is shown

```auto
19.01.21 15:19:07 (+0000) Service exited 'main sha256:891e5f1484de4baad32a970350d7846829e6c1ca38f78d06a56728eb93831ff0'
19.01.21 15:19:14 (+0000) Restarting service 'main sha256:891e5f1484de4baad32a970350d7846829e6c1ca38f78d06a56728eb93831ff0'
19.01.21 15:19:03 (+0000) main Error: Expecting value: line 2 column 1 (char 1)
19.01.21 15:19:20 (+0000) main Error: Expecting value: line 2 column 1 (char 1)
19.01.21 15:19:24 (+0000) Service exited 'main sha256:891e5f1484de4baad32a970350d7846829e6c1ca38f78d06a56728eb93831ff0'
19.01.21 15:19:32 (+0000) Restarting service 'main sha256:891e5f1484de4baad32a970350d7846829e6c1ca38f78d06a56728eb93831ff0'
19.01.21 15:19:20 (+0000) main Error: Expecting value: line 2 column 1 (char 1)
19.01.21 15:19:38 (+0000) main Error: Expecting value: line 2 column 1 (char 1)
19.01.21 15:19:43 (+0000) Service exited 'main sha256:891e5f1484de4baad32a970350d7846829e6c1ca38f78d06a56728eb93831ff0'
19.01.21 15:19:55 (+0000) Restarting service 'main sha256:891e5f1484de4baad32a970350d7846829e6c1ca38f78d06a56728eb93831ff0'
19.01.21 15:19:38 (+0000) main Error: Expecting value: line 2 column 1 (char 1)

```

---

<div class="post-metadata">

**Author:** ![anujdeshpande](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/anujdeshpande/32/3155_2.png) [@anujdeshpande](https://forums.balena.io/u/anujdeshpande)\
**Post date:** [January 20, 2021, 7:13am UTC](https://forums.balena.io/t/display-for-train-display/227402/16 "2021-01-20T07:13:04Z")

</div>

Hi

Seems like there’s an error with parsing a json file in your setup. This makes the python script exit, which causes the service to restart. This goes on in a loop.

To figure what’s going on with the json - let’s take a look at the bash script that populates them with the right information [here](https://github.com/balenalabs/uk-train-departure-display/blob/master/balena-run.sh). As you can see it depends on some environment variables that need to be setup in the balenaCloud dashboard - as mentioned [here](https://github.com/balenalabs/uk-train-departure-display#configuration)

- Can you confirm that you have all these values populated in the dashboard for the device? If possible do share a screenshot.
- You said that you had it working and then it stopped. Did you do any changes to the configurations recently?
- If both the above points are fine, I think we should look at the transport API and see if there have been any changes on that front which would break this on your device.
