2nd_quadrant
Posts: 4
Joined: Sun Jun 15, 2014 4:15 pm

Printing to the Pi Touchscreen

Sat Apr 30, 2016 4:19 pm

I have a Pi 3 attached to the Official Pi Touchscreen all up and running.
I have written a Python script that waits for Sensor data from a Pi zero which in turn is listening for numerous WirelessThings devices to send information.
The Pi 3 receives the message, strips out the required detail and sends the data up to Thingspeak.
All working well and getting lots of data running through fine.

When I originally developed this I had the python script running in a terminal. printing our various debug data points while it was running until it became stable at which point I commented out the debug lines, set it to start in background on reboot in crontab, rebooted the Pi and all has been working well.

I thought it would be a good idea to have some of the debug data scrolling up on the the Pi Touchscreen, if only to show that it is still working. I removed the # from the appropriate lines and rebooted.

Data is still appearing in Thingspeak ok but nothing scrolling up on the Touchscreen.

I must be missing something really easy here but can't work out what it is.

The relevant python lines are;;
# Get raw data message
data, source = s.recvfrom(1024)
# Write raw message data to logfile
msg = str(source) + ' ' + data + '\n'
writelogfile(msg)
print msg

The right information is getting written to the logfile just not printed to the touchscreen
There is no HDMI screen attached to the Pi.

Waiting in the hope that I will be shown that this is a simple noob error.

Thanks

Return to “Python”