first I am new in programming and tried a few tutorials and played around a little bit.
I want to realize that my unicorn pHat shows the outside temperature in colours. When it's cold outside the colour is blue when hot it's red. I have another raspberry with a DS18B20 that logs the outside temperature.
I have a text file that contains the temperature (for example 3.19) I want to read this file and show a temperature in colours on the unicorn pHat (cold in blue, hot in red). After a hour or whatever it should check the file again.
But I have no idea how to do this. After trying a few beginner tutorials I know how to change the colour of the unicorn pHat (yeah ;)) but I do not find something how to read a file and change the colour in dependency to the temperature value.
Can someone give me a hint?
An idea for future doing is to show temperature in rows every row shows the temperature of previous hours.
Thanks & best regards