Sunday 25 June 2017

How to used Gauge in MQTT cloud using Python

How to used Gauge in MQTT cloud using Python:


from Adafruit_IO import Client
aio = Client('Your Adafruit IO Key')

import RPi.GPIO as GPIO
import time
import signal
import sys

# use Raspberry Pi board pin numbers
GPIO.setmode(GPIO.BCM)

aio.send('gauge',10)

data = aio.receive('gauge')
print('Received value: {0}'.format(data.value))


Circuit Diagram:



0 comments:

Post a Comment

if you have any doubt please let me know