Giter VIP home page Giter VIP logo

lcd's Introduction

LCD

This repository contains all the code for interfacing with a 16x2 character I2C liquid-crystal display (LCD). This accompanies my Youtube tutorial: Raspberry Pi - Mini LCD Display Tutorial.

You can buy one of these great little I2C LCD on eBay or somewhere like the Pi Hut.

Installation

  • Install git

    sudo apt install git
    
  • Clone the repo in your pi home directory

    cd /home/pi/
    git clone https://github.com/the-raspberry-pi-guy/lcd.git
    cd lcd/
    
  • Run the automatic installation script with sudo permission

    sudo ./install.sh
    
  • After rebooting, try one of the demos

    cd /home/pi/lcd/
    ./demo_clock.py
    

Demos

Backlight Control

This is a demo developed by user and watcher @Tomtom0201, showcasing backlight control of the LCD (available on some hardware):

Forex

This is a demo developed by user and watcher @bariskisir. It requires python-pip and the packages requests and bs4 (BeautifulSoup) because it parses web content.

  • Install pip
    sudo apt install python-pip
    
  • Then install requests and bs4
    pip install requests bs4
    
  • Now you should be able to run demo_forex.py:

I haven't been able to test it myself personally, but it looks like a cool Forex stream. If you run into any bugs with it, please feel free to reach out to bariskisir and submit a PR.

IP Address

Another demo developed by @Sierra007117:

Display your Pi's IP address - useful for SSH'ing and more!

NetMonitor

A demo created by @cgomesu that uses ping and nc (netcat) to monitor the network status of hosts and services, respectively. This demo uses built-in tools, so nothing new needs to be installed.

Hosts and services can be modified by editing their respective dictionaries:

hosts = {
    'Internet': '8.8.8.8',
    'Firewall': '192.168.1.1',
    'NAS': '192.168.1.2'
}
services = {
    'Cameras': {'ip': '192.168.1.2', 'port': '8000'},
    'Plex': {'ip': '192.168.1.2', 'port': '32400'}
}

After editing the hosts and services dictionaries, you can run this demo in the background (as a service) as follows:

  1. Create a new service file in /lib/systemd/system/ called rpi-netmonitor.service:
nano /lib/systemd/system/rpi-netmonitor.service
  1. Copy and paste the following in the new service file:
[Unit]
Description=A RPi network monitor for a 16x2 LCD

[Service]
Type=simple
User=pi

ExecStart=/usr/bin/python /home/pi/rpi-lcd/demo_netmonit.py

Restart=always
RestartSec=5

KillMode=process
KillSignal=SIGINT

[Install]
WantedBy=multi-user.target
  1. Enable the service and start it:
sudo systemctl enable rpi-netmonitor.service
sudo systemctl start rpi-netmonitor.service
  1. Check that the LCD is displaying the correct information; otherwise, check the service status
sudo systemctl status rpi-netmonitor.service

lcd's People

Contributors

cgomesu avatar the-raspberry-pi-guy avatar tomtom0201 avatar didaquis avatar msneloy avatar bariskisir avatar julianbruegger avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.