Raspberry Pi Traffic Light Changes Based on Air Quality

Source: Tom's Hardware added 07th Jun 2021

  • raspberry-pi-traffic-light-changes-based-on-air-quality

(Image credit: Dmytro Panin)

This Raspberry Pi project looks like a toy but it’s actually a useful air quality reporting system. It was created by maker Dmytro Panin who used a toy traffic light alongside a Raspberry Pi 3B+ to create the final design.

The best Raspberry Pi projects improve our quality of life and this project is no exception. According to Panin, his area is currently experiencing a season of peat fires which can cause the smog levels of the city to increase dramatically and unexpectedly. This project aims to reduce unwanted exposure to higher pollution levels.

The Raspberry Pi is housed inside of a Lego-compatible case. The toy traffic light is connected to the GPIO of the Pi which pulls air quality data from an aggregated API. When the air quality levels change, the light changes to correspond with the level of pollution. The green light is optimal while the red light indicates poor quality air.

The script used to pull air quality data was written using Go while a Python script is responsible for changing the lights on the traffic signal. The LEDs are controlled using GPIO Zero, an easy to use Python library designed to simplify electronics, created by Ben Nuttall who we recently had the pleasure of featuring on our Raspberry Pi-themed podcast, The Pi Cast.

To take a closer look at this project, check out the project page at GitHub and follow Dmytro Panin for more cool creations.

Read the full article at Tom's Hardware

brands: Area  Best  It  LEGO  Python  Raspberry  Raspberry Pi  WAS  
media: Tom's Hardware  

Related posts


Notice: Undefined variable: all_related in /var/www/vhosts/rondea.com/httpdocs/wp-content/themes/rondea-2-0/single-article.php on line 88

Notice: Undefined variable: all_related in /var/www/vhosts/rondea.com/httpdocs/wp-content/themes/rondea-2-0/single-article.php on line 88

Related Products



Notice: Undefined variable: all_related in /var/www/vhosts/rondea.com/httpdocs/wp-content/themes/rondea-2-0/single-article.php on line 91

Warning: Invalid argument supplied for foreach() in /var/www/vhosts/rondea.com/httpdocs/wp-content/themes/rondea-2-0/single-article.php on line 91