Hi All,
I have trying to track down a bug, either in my code, or with my Pi B or possibly a Adafruit RGB LCD Plate. Initially I thought the problem may have been with the Pi's thermal sensor as it had appeared from research that there was such a problem in the past.
However, I've run about a half dozen experiments to isolate the problem and it appears that any time I am outputting to the Adafruit LCD and reading the internal thermal sensor, the python script will freeze randomly over a couple of days of running.
The setup is basically, a Pi Model B, a Wyolum Alamode and the LCD Plate stacked on top with a ribbon cable.
The significant code in the python script is...
with open("/sys/class/thermal/thermal_zone0/temp","r") as file:
value= float(file.readline().strip("\n"))
It always freeze either at the open or the read.
I also have a temperature sensor connected to the Alamode. If I read from the internal temp sensor and utilize the LCD (for example, to display the temperature), I get the random freeze. When I use the Alamode's sensor and the LCD, it runs no problem. I have also removed the LCD and read the internal sensor and... it runs no problem. So I'm kind of getting the impression the Adafruit LCD might be the problem. I am going to take this up with them at some point... but a final note, the LCD uses I2C for communications and I am reading from the Alamode over serial.
However, all that being said, has anyone else experience a similar problem or conflict while reading from the internal CPU temperature sensor... or have any ideas what might be the problem???