raspberry pi - Raspbian GrovePi Python Error "Too many values to unpack" -
we're working on temperature/humidity sensor on raspberry pi 3 b. dht22 sensor pluged in on grovepi. sensor working fine far.
let's come actual problem:
import grovepi # connect grove temperature & humidity sensor pro digital port d4 # sig,nc,vcc,gnd sensor = 4 while true: try: [temp,humidity] = grovepi.dht(sensor,1) print "temp =", temp, " humidity =", humidity except ioerror: print "error" this our python script. should print out temperature , humidity. when execute script receive following exception:
[temp.humidity] = grovepi.dht(sensor, 1)
valueerror: many values unpack
you can see script , expected outcome @ website:
http://wiki.seeed.cc/grove-temperature_and_humidity_sensor_pro/
Comments
Post a Comment