It isn't I want to try for the title of "Most active posts". I am trying to keep things segmented.
I am faced with this scenario:
I have a PiFaceCAD hat for the RasPi. It works.
It came with some python scripts and they work.
(Well, that's a bit debatable. However.)
There is a problem though, and thus me posting:
Say I use their script to write to the display:
I send "Hello there". (Quotes included)
Hello there on the screen. No big. The
" absorbs the space and make the two words one parameter.
But if I run the script again: The display blinks (LED/backlight goes off then on); the display is wiped and
Hello there is again displayed. But in the same position as before.
If I open a CLI (terminal) and type
python and basically set things up with
import sys and
import pifacecad then enter the command to write "Hello there" I get
Hello there on the screen.
I enter the command again and this time I see a second
Hello there on the screen appended to the first.
The display doesn't blink. It isn't cleared!
(I think it is now customary to say.....) Woo Hoo!
So....... Thinking about it.
And with help from other research.
python code is invoked (the session - if you will) it initialises things. And part of that is clearing the display.
However, when I am still in
python via the CLI, that is only done ONCE, and I don't get the initialisation done every time the script is run.
This is a concern, as I want to write a flow in Node-Red which writes data to the display at co-ordinates I give in the message.
The last thing I want is every time a messages is sent, the rest of the display is wiped. (And the backlight is turned off then back on.)
So, are my theories correct in what is happening? (Kind of a bit late. I have ordered the hardware)
But if this theory is true: I could hack the python stuff and negate the initialisation stuff and set it as a new parameter I can send to the display.
Yes, it is murky waters into which I am sailing. But I am hoping this is a learning curve which I can over come.
I'm asking here because it is how Node-Red interacts with
python which is of interest.
Another way is that I could set variables in/via Node-Red and have a python script that merely echoes those onto the display.
But that is whole other way of doing it.
I'd prefer the prior way.