HI,
I am trying to get a python code working so i can display the temp on my scroll phat.
Here is the python script and error:
import sys
import string
import time
import scrollphat
from envirophat import weather
scrollphat.set_brightness(2)
while True:
try:
temp = weather.temperature()
scrollphat.write_string(temp)
print temp
time.sleep(4)
except KeyboardInterrupt: scrollphat.clear() sys.exit(-1)
With the error
Traceback (most recent call last):
File “tempd.py”, line 13, in
scrollphat.write_string(temp)
File “/usr/lib/python2.7/dist-packages/scrollphat/init.py”, line 68, in write_string
controller.write_string(chars,x)
File “/usr/lib/python2.7/dist-packages/scrollphat/IS31FL3730.py”, line 80, in write_string
for char in chars:
TypeError: ‘float’ object is not iterable
Any ideas ?