IoT on a PI with Python
- Justin Holm

- Jul 4, 2020
- 1 min read
The following shows how to interact with a light with Python code using a Raspberry PI with a GPIO (general purpose input output) board. It is a very simple example but all sorts of senors and motors can also be attached and controlled in a similar way.

Then running some code to turn on and off the light:

Then light light will turn on for 2 seconds:

And off for 2 seconds:

Next Steps:
Connect a servo (motor) and a sensor



Comments