How to send Text to MQTT Cloud Server.
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)
while True:
aio.send('text', "Hello")
print('Received value: {0}'.format(data.value))
0 comments:
Post a Comment
if you have any doubt please let me know