# Asking again about options with this display

**URL:** https://discourse.nodered.org/t/asking-again-about-options-with-this-display/57226
**Category:** General
**Created:** [25 January 2022 21:22 UTC](https://discourse.nodered.org/t/asking-again-about-options-with-this-display/57226 "2022-01-25T21:22:46Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [25 January 2022 21:22 UTC](https://discourse.nodered.org/t/asking-again-about-options-with-this-display/57226/1 "2022-01-25T21:22:46Z")

</div>

I have one of these displays:

> **[SparkFun 20x4 SerLCD - RGB Backlight (Qwiic) - LCD-16398 - SparkFun Electronics](https://www.sparkfun.com/products/16398)**
>
> The SparkFun Qwiic SerLCD is a serial enabled LCD that provides a simple and cost effective solution for adding a 20x4 Black on RGB LCD to a project.

It has 3 kinds of comms options.  
I2C  
SPI  
and another one...

(What ever)

I **sort of** have it working, but it isn't perfect.  
☹

After more digging I have been told of this:

[http://www.cpmspectrepi.uk/raspberry\_pi ... gData.html](http://www.cpmspectrepi.uk/raspberry_pi/MoinMoinExport/LcdEstrobeTimingData.html)

Which is indicative of timing problems. ☹😢

Ok, so if it is that, I am guessing that _all bets are off_ and there is SFA I can do about it.

As is I am using the I2C and sending code/messages to it via MQTT to a python(3) program that then sends the messages to the display.

Would there be a way to talk to it directly within Node-Red?  
Rather than using MQTT and a python script.

---

<div class="post-metadata">

### Author: ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)
#### Post date: [26 January 2022 18:17 UTC](https://discourse.nodered.org/t/asking-again-about-options-with-this-display/57226/2 "2022-01-26T18:17:24Z")

</div>

> [@Trying\_to\_learn](#):
>
> and another one.

Looks like the other one is serial port, did you look at using that with serial out node ?  
Do you actually want it connected to the Pi ie in the same location ?

---

<div class="post-metadata">

### Author: ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)
#### Post date: [26 January 2022 18:30 UTC](https://discourse.nodered.org/t/asking-again-about-options-with-this-display/57226/3 "2022-01-26T18:30:14Z")

</div>

> [@Trying\_to\_learn](#):
>
> As is I am using the I2C and sending code/messages to it via MQTT to a python(3) program that then sends the messages to the display.

Thinking about it, its the python code that would handle all the data and timing etc. So if it works ok from the command line then using NR to send the same data to the python code shouldn't cause an issue ?

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [26 January 2022 19:46 UTC](https://discourse.nodered.org/t/asking-again-about-options-with-this-display/57226/4 "2022-01-26T19:46:58Z")

</div>

Which GPIO pin(s) does the `serial out` appear?

---

<div class="post-metadata">

### Author: ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)
#### Post date: [27 January 2022 17:29 UTC](https://discourse.nodered.org/t/asking-again-about-options-with-this-display/57226/5 "2022-01-27T17:29:49Z")

</div>

If you just google rpi 4 pinout you will find lots of drawings.

However I wouldn't worry about that, does the display work OK using Python from the command line using any supplied examples ?

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [27 January 2022 20:01 UTC](https://discourse.nodered.org/t/asking-again-about-options-with-this-display/57226/6 "2022-01-27T20:01:20Z")

</div>

The display is working as best I can see.

you/we are not on quite the same page.

GPIO pin ....14 is HEADER pin 9.

It would be a **LOT** easier if it was called PIN 9.

Your question:

> [@Sean-McG](#):
>
> does the display work OK using Python from the command line using any supplied examples

Is confusing.

_WORK_ is a bit vague to use in this sense.  
It works as in it shows what I send. But if it is used by Node-Red in an ongoing scenario, these rogue characters appear.

So it is working, or isn't it?

After other digging I have been told there is a known problem with the timing.

(mentioned above)

As this display has a `serial in` option: would that work if I changed the code and send stuff to it via the `serial` node - and, of course - moved the wire/s from where they are to pin 9 (GPIO 14) and the `serial in` on the display.

---

<div class="post-metadata">

### Author: ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)
#### Post date: [28 January 2022 12:44 UTC](https://discourse.nodered.org/t/asking-again-about-options-with-this-display/57226/7 "2022-01-28T12:44:50Z")

</div>

So my question is does it work perfectly from the command line ?

If so then I don't think that sending data to the python scripts from node red would cause any timing issues.

So how are you doing the last bit ?

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [28 January 2022 20:17 UTC](https://discourse.nodered.org/t/asking-again-about-options-with-this-display/57226/8 "2022-01-28T20:17:53Z")

</div>

> [@Sean-McG](#):
>
> So my question is does it work perfectly from the command line ?

Again, this is a vague question - to me.

I never talk to it from the CLI. (Command line)

I ONLY use python.

Node-red sends MQTT messages which are received by the python script and it _converts_ them to be able to be sent on the I2C bus.

> [@Sean-McG](#):
>
> sending data to the python scripts from node red would cause any timing issues.

That isn't where the timing issue is claimed to be. It is in the timing of sending messages on the I2C bus.  
Native to the RasPi.

I am going to have to connect a monitor and run a program to simulate having a CRO connected to the Pi and look at the timing.

Though if it is a native timing problem I may be better off investing time in working out how to use the serial port on the display.

(and) just now a few other jobs are very important to get resolved.  
☹

---

<div class="post-metadata">

### Author: ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)
#### Post date: [28 January 2022 23:14 UTC](https://discourse.nodered.org/t/asking-again-about-options-with-this-display/57226/9 "2022-01-28T23:14:48Z")

</div>

> [@Trying\_to\_learn](#):
>
> GPIO pin ....14 is HEADER pin 9.

[Pins / GPIO](https://roboticsbackend.com/raspberry-pi-3-pins/)

---

<div class="post-metadata">

### Author: ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)
#### Post date: [28 January 2022 23:36 UTC](https://discourse.nodered.org/t/asking-again-about-options-with-this-display/57226/10 "2022-01-28T23:36:27Z")

</div>

> [@Trying\_to\_learn](#):
>
> Again, this is a vague question - to me.
> 
> I never talk to it from the CLI. (Command line)
> 
> I ONLY use python.

Bearing in mind this is a NR forum and I don't have your display or software -

I'm assuming that you run a python script from the command line ?

> [@Trying\_to\_learn](#):
>
> The display is working as best I can see

> [@Trying\_to\_learn](#):
>
> _WORK_ is a bit vague to use in this sense.  
> It works as in it shows what I send

So I do not see how it can be an I2c timing issue, since the python script must be using I2c at this point and works OK.  
Can you provide more info on how you get a message from NR into the python script.

---

<div class="post-metadata">

### Author: ![mharsch](https://avatars.discourse-cdn.com/v4/letter/m/ebca7d/32.png) [@mharsch](https://discourse.nodered.org/u/mharsch)
#### Post date: [18 March 2022 00:30 UTC](https://discourse.nodered.org/t/asking-again-about-options-with-this-display/57226/11 "2022-03-18T00:30:46Z")

</div>

I've just published a node for these displays (Sparkfun SerLCD):

> **[@mharsch/node-red-serlcd](https://flows.nodered.org/node/@mharsch/node-red-serlcd)**
>
> Node-RED nodes for SparkFun SerLCD boards

Feedback always welcome; please submit via Github issues.

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [18 March 2022 20:22 UTC](https://discourse.nodered.org/t/asking-again-about-options-with-this-display/57226/12 "2022-03-18T20:22:50Z")

</div>

Thanks.

I'll look at it when I can.

Just that in the mean time, I have for things working and found the I2C bus problematic with some displays.

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [18 March 2022 20:29 UTC](https://discourse.nodered.org/t/asking-again-about-options-with-this-display/57226/13 "2022-03-18T20:29:18Z")

</div>

Just to put all up to date:

Using the said display and controlling it with the I2C bus:  
Now and then weird characters would appear.

As it has a `comm port` I changed the code to talk to it via the comms port.

It ran for days and no weird characters.

So I am leaving well enough alone.

I2C is problematic. Comm port isn't.

Overview:  
Both ways the display was controlled by python(3).

This is because there was no easy way to get the information from NR to the display via the script.  
(That is a whole other thing)

So a python program was written and it worked - via I2C.  
Things were ok at the start.  
Then every now and then weird characters would appear at non addressed positions on the screen.

Asking around it was said that this may be a timing problem. I don't get that as I2C is supposed to be self timed.... But that's what was said by people smarter than me.

I then changed the code and talked to the display via the COMM port.

No weird characters.

What more can I say?

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [18 March 2022 20:30 UTC](https://discourse.nodered.org/t/asking-again-about-options-with-this-display/57226/14 "2022-03-18T20:30:13Z")

</div>

I send the message to the python script by MQTT - in both cases.

---

<div class="post-metadata">

### Author: ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)
#### Post date: [22 March 2022 01:19 UTC](https://discourse.nodered.org/t/asking-again-about-options-with-this-display/57226/15 "2022-03-22T01:19:39Z")

</div>

> [@Sean-McG](#):
>
> Looks like the other one is serial port...

That was a while ago - glad you got it working 😉

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [21 May 2022 01:20 UTC](https://discourse.nodered.org/t/asking-again-about-options-with-this-display/57226/16 "2022-05-21T01:20:09Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
