AttributeError: module 'thingspeak' has no attribute 'Channel' channel = thingspeak.Channel(id=channel_id, api_key=key)
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
In the example raspberry pi py script, which was working fine, now i am getting this error. Cant find any sililar issues on the net... any ideas peeps?
import thingspeak
import time
channel_id = 1231234 # PUT CHANNEL ID HERE
key = '123123123123' # PUT YOUR WRITE KEY HERE
pin = 4
def measure(channel):
try:
# write
response = channel.update({'field1': 2, 'field2': 1})
# read
read = channel.get({})
print("Read:", read)
except:
print("connection failed")
if __name__ == "__main__":
channel = thingspeak.Channel(id=channel_id, api_key=key)
while True:
measure(channel)
# free account has an api limit of 15sec
time.sleep(15)
2 comentarios
Respuestas (0)
Comunidades de usuarios
Más respuestas en ThingSpeak Community
Ver también
Categorías
Más información sobre ThingSpeak en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!