© Charles Bell 2017

Charles Bell, MicroPython for the Internet of Things, https://doi.org/10.1007/978-1-4842-3123-4_9

9. Project 2: Stoplight Simulator

Charles Bell

(1)Warsaw, Virginia, USA

Now that we’ve had a tutorial of how to design, wire, and implement a MicroPython project, let’s now look at a more advanced project. In this case, we will use some very basic components to learn further how to work with hardware. The hardware of choice for this project will be LEDs, resistors, and a button. A button is the most basic of sensors. That is, when the button is pressed, we can make our MicroPython code respond to that action.

Working with LEDs is perhaps more of a “Hello, World!” style project for hardware because turning LEDs on and off is easy and ...

Get MicroPython for the Internet of Things: A Beginner’s Guide to Programming with Python on Microcontrollers now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.