top of page

IoT on a PI with Python

Writer's picture: Justin HolmJustin Holm

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

10 views0 comments

Recent Posts

See All

Comments


bottom of page