You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
a) The **Publisher and Subscriber** folder contains **AWS_IoT_pub.py** file that **publishes(sends)** the data to the AWS IoT service and **AWS_IoT_sub.py** that **subscribes** to the service and shows(get) the data from the AWS IoT on the second Terminal. Currently, **AWS_IoT_sub.py** subscribes to any topic and will show all of the received msgs but we can customize it to get a perticular message.
46
-
47
-
b) The second file consists of the code that reads the state of the pins of **Raspberry Pi3** (change Pin Numbers for other Raspberry Pi Boards) and sends this to the AWS IoT updating the state as its changed.
48
-
For this, we have connected some LED's to the pins of the Raspberry Pi that represent the state of the pins.
45
+
The publisher code reads the state of the pins of **Raspberry Pi3** (change Pin Numbers for other Raspberry Pi Boards) and sends this to the AWS IoT updating the state as its changed. For this, we have connected some LED's to the pins of the Raspberry Pi that represent the state of the pins.
49
46
If the LED's glow, it's state is '1' else '0' (You can make changes in the code as you want).
50
47
48
+
The subscriber code fetches the state of the LED's from AWS IoT and prints it on the second terminal.
49
+
50
+
51
51
## To Test the sample Python Programs:
52
52
i) In one terminal, run the **AWS_IoT_pub.py** code using
0 commit comments