User Tools

Site Tools


mqtt_sample_code

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
mqtt_sample_code [2016/09/28 08:11] tomglemqtt_sample_code [2016/09/28 08:12] (current) tomgle
Line 6: Line 6:
  
      GPIO.setmode(GPIO.BOARD)      GPIO.setmode(GPIO.BOARD)
 +     
      GPIO.setup(13,GPIO.IN)      GPIO.setup(13,GPIO.IN)
 +     
      mqttc=mqtt.Client()      mqttc=mqtt.Client()
      mqttc.connect("iot.eclipse.org",1883,60)      mqttc.connect("iot.eclipse.org",1883,60)
      mqttc.loop_start()      mqttc.loop_start()
 +     
      def reading1():      def reading1():
        a=GPIO.input(13)        a=GPIO.input(13)
mqtt_sample_code.1475064680.txt.gz · Last modified: 2016/09/28 08:11 by tomgle