Skip to Main Content
Creative DIY Microcontroller Projects with TinyGo and WebAssembly
book

Creative DIY Microcontroller Projects with TinyGo and WebAssembly

by Tobias Theel
May 2021
Intermediate to advanced content levelIntermediate to advanced
322 pages
5h 24m
English
Packt Publishing
Content preview from Creative DIY Microcontroller Projects with TinyGo and WebAssembly

Chapter 2: Building a Traffic Lights Control System

In the previous chapter, we set up TinyGo and our IDE, and we now know how to build and flash our programs to the Arduino UNO. We are now going to utilize this knowledge to go one step further.

In this chapter, we are going to build a traffic lights control system. We are going to split the project into small steps, where we build and test each component. At the end, we are going to put everything together. We will be using multiple LEDs, a breadboard, GPIO ports, and a button to interrupt the normal flow to switch pedestrian lights to green. By the end of the chapter, you will know how to control external LEDs, read the state of a button, use GPIO ports, how to distinguish resistors, and how ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

DIY Microcontroller Projects for Hobbyists

DIY Microcontroller Projects for Hobbyists

Miguel Angel Garcia-Ruiz, Pedro Cesar Santana Mancilla
Arduino Cookbook, 3rd Edition

Arduino Cookbook, 3rd Edition

Michael Margolis, Brian Jepson, Nicholas Robert Weldin

Publisher Resources

ISBN: 9781800560208Supplemental Content