top of page

Beijing AQI

​

The Raspberry Pi gets the latest Beijing AQI reading from the web every 30 minutes, then displays it on a LCD.

 

  1. You will need to connect a I2C LCD to the Raspberry Pi

    1. The LCD uses 5V, not 3.3V

  2. You will need to enable the I2C interface on the RPi

    1. In terminal, “sudo raspi-config” then enable the I2C interface

    2. In terminal, “sudo i2cdetect -y 0” to get the LCD’s address.  Our code uses address 0x3F

  3. There are three files

    1. i2c_lib.py – this teaches the RPi how to talk to the LCD Display

    2. lcddriver.py – these contain the actual commands that the LCD understands

    3. AQI.py – this is the code you run for displaying the AQI

  4. There is a potentiometer behind the LCD.  You may have to adjust it to get a good contrast to see the display.

© 2017 by Prompt Box.

  • Facebook - Grey Circle
  • LinkedIn - Grey Circle
  • Google+ - Grey Circle
bottom of page