Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5565

Automation, sensing and robotics • Re: Extract specific variable from this code

$
0
0
That got me F1, but I can't figure out F2 and F3. I've changed the[1] to [2] but I get an error

Traceback (most recent call last):
File "/home/pi/FridgeDSTemps.py", line 100, in module
F2 = round(read_temp()[2],1)
IndexError" tuple index out of range

Code:

F2 = round(read_temp()[2],1)    print(F2)

EDIT: STANDBY...I may have it now. I see what I did with the (read_temp()[2],1) step

Statistics: Posted by duckredbeard — Fri Dec 22, 2023 11:55 pm



Viewing all articles
Browse latest Browse all 5565

Trending Articles