Hi all,
Long time reader of the forum and it has answered all my questions to date, thank you.
I'm looking for the best method to do this. There seems to be many routes I can go and I'm getting myself in a muddle trying to figure out the best way.
I have a Python3 script that show info on a screen using Pygame on a Raspberry Pi. It's written to the framebuffer so no desktop is required. There are many possible configurations of colours/text on the screen so I ported all the variables to a separate Python file to save me trawling through the main script each time I want to change something. This variables file is imported at the beginning of the main script. This all works perfectly and I would like to keep this part as is.
What I would like to do is create a dashboard that allows me to change the variables and then update the variables file.
There are about 40 different variables in the file. This is a sample:
SIGN1_ON_COLOR = (250, 20, 20)
SIGN1_OFF_COLOR = (21, 0, 0)
SIGN1_ON_TEXT_COLOR = (251, 251, 251)
SIGN1_OFF_TEXT_COLOR = (65, 65, 65)
SIGN1_ON_TEXT = "DOOR OPEN"
SIGN1_OFF_TEXT = "DOOR CLOSED"
SIGN1_FONT_SIZE = 150
SIGN2_ON_COLOR = (20, 20, 250)
SIGN2_OFF_COLOR = (10, 10, 30)
SIGN2_ON_TEXT_COLOR = (251, 251, 251)
SIGN2_OFF_TEXT_COLOR = (65, 65, 65)
SIGN2_ON_TEXT = "HEATING ON"
SIGN2_OFF_TEXT = "HEATING OFF"
SIGN2_FONT_SIZE = 150
In very simplistic terms, I imagine that I can use the text input feature on dashboard to get the info and then use a function node to format it and then the file node to write the file to the desired location. This will be a challenge for me to do but I am very willing to put the time in and figure it out.
Can someone please advise if this is the best way to do it? Is there another simpler way to do it that I haven't come across yet?
Advice would be very welcome.
Thanks in advance
Ant.