Chapter 20: Python and IoT
Using Python on IoT Devices
sudo apt update sudo apt install python3
import RPi.GPIO as GPIO
import time
# Set up GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setup(18, GPIO.OUT)
# Blink LED
for _ in range(5):
GPIO.output(18, GPIO.HIGH)
time.sleep(1)
GPIO.output(18, GPIO.LOW)
time.sleep(1)
GPIO.cleanup()Working with Sensors and Actuators
IoT Protocols
Building an IoT Project
Exercises
Best Practices
Last updated