Tag Archives: LCD

LCD1602 Display Library for Micropython and the Raspberry Pi Pico W

This is some demonstration sample code showing use of the LCD1602 as an LCD display for the Raspberry Pi Pico W. The code is explained in the video above. It will prompt a user for his name, and then display a greeting on the LCD.

 

Below is the library for the Sunfounder Kepler Kit LCD1602 display. It allows the LCD display to operate with the Raspberry Pi Pico W. The code should be copied and pasted into Thonny, and then saved to your Raspberry Pi Pico W, to the same folder that contains you Python code. It MUST be saved with file name lcd1602.py

 

Raspberry Pi LESSON 37: Raspberry Pi Security System


 

In this lesson we add an audible alarm to our security system. I am connecting to a Bluetooth speaker, and then using the pygame library to play an alarm sound. The pygame library will play any .mp3 file, so search the internet and find a suitable alarm sound for your system. I amusing an air raid siren, and really like it! Below for your convenience is the code we develop in this video:

 

Raspberry Pi LESSON 36: Motion Detection Alarm System With LCD and Keypad

In this lesson we show the basic framework for an Alarm System with operator control through a keypad, and output to an LCD screen. We incorporate a PIR sensor to detect motion. In the next lesson we will add an audible alarm. For your convenience, the code developed in the above video is included below:

 

Creating a programmable Temperature Alarm with the Raspberry Pi

In this video lesson we show how to create a programmable temperature alarm using the Raspberry Pi, the DHT11 sensor, the ADC0834, a potentiometer and a buzzer. The results are displayed on a LCD1602 LCD display with a i2c connection. The device operates in either program mode or monitor mode. Pressing the button puts you in programming mode. In this mode you turn the potentiometer until your desired set temperature is reached. Then pressing the button again will switch you to monitor mode. In monitor mode the current temperature and humidity are displayed on the LCD. When the temperature exceeds your setpoint, the buzzer will release an audible alarm. Below is the schematic for our build.

temperature sensor
This schematic shows how to create a programmable temperature alarm

Library for I2C Connection of the LCD1602 to the Raspberry PI


This lesson shows how to connect an LCD1602 to a Raspberry Pi using only 4 wires by I2C. You will need to copy the code below, and create a program called LCD1602.py, and save it in the same folder your main python programs are in.