LCD-Clock-A

From Waveshare Wiki
Jump to: navigation, search
LCD-Clock-A
LCD-Clock-A.jpg

1.14", 135 × 240
SPI
{{{name2}}}

{{{name3}}}

{{{name4}}}

{{{name5}}}

{{{name6}}}

Overview

Product Introduction

Programmable RGB pseudo nixie tube clock
Support Raspberry Pi Pico or Zero.
Do you know the old glory of the last century: the nixie tube?
Worried about the shutdown and short service life of the nixie tube?
This is an LCD pseudo nixie tube clock that can help you recall this punk style.

Specification

Parameter Name Parameters
Dimensions 200mm × 80mm × 34mm
Weight 430g
Power 5V 2A
Interface Type-C
LCD screen 1.14", 135 × 240 pixels
Cover Quartz glass
Support Raspberry Pi Pico (with pinheader version) and Raspberry Pi Zero / Zero 2 W (not included)

Onboard Resources

LCD CLOCK 01.jpg

How To Assemble

LCD CLOCK 02.png
Note: please download the code to the host control first, and test it before assembling!

  • Step 1: Insert the host control (Raspberry Pi ZERO, pico, esp32-s2-pico) into the back of the "1" board. The pico and esp32-s2-picode USB ports are facing outwards without screws. Raspberry Pi needs (2x copper posts + 4 silver-white screws) to fix the 2 holes on the non-interface side;
  • Step 2: On 1 to 2, you need to pay attention to 1. You must put the 4 buttons on the side before you can put them in. Then use the patterned copper column, first lightly lock the diagonal alignment holes, then lock the rest, and then all tightened (4 single-headed copper posts);
  • Step 3: Install 3 on 2, use black screws, in the same way, first lightly lock the diagonal alignment holes, then lock the rest, and then tighten them all (4 black);
  • Step 4: Insert the LCD into the 1 board, the side with the buttons is the back of the LCD, then put the glass cover, and lock it with silver-white screws (6*2 silver-white);
  • Step 5: Cover 4 on top of 2, use black screws to lock the diagonally aligned holes first, then lock the rest, and then tighten them all (4 black).

Working With Raspberry Pi Zero

Please test the code first before assembling.

Install Library

#python2
sudo apt-get update
sudo apt-get install python-pip
sudo apt-get install python-pil
sudo apt-get install python-numpy
sudo pip install spidev
sudo pip install rpi_ws281x
#python3
sudo apt-get update
sudo apt-get install python3-pip
sudo apt-get install python3-pil
sudo apt-get install python3-numpy
sudo pip3 install spidev
sudo pip3 install rpi_ws281x

Download & Test The Demo

Open the terminal of Raspberry Pi, run the following demo:

sudo apt-get install unzip -y
sudo wget https://files.waveshare.com/upload/a/ae/LCD-Clock-A-Code.zip
sudo unzip ./LCD-Clock-A-Code.zip -d ./LCD-Clock-A-Code/
cd LCD-Clock-A-Code/rpi/

Run The Program

Please keep it in the directory of the previous step. In order to display the time normally, please follow the steps below:

  • For the first configuration, the default time of the program is the system time written into the RTC, so write the time for the first time. If the time is not correct, the system can be adjusted to the correct time or adjusted through the menu during runtime.
ls -l
sudo python main.py
  • Open main.py and comment the forty-second line of code:
sudo nano +42 main.py 

Then enter # to comment, press ctrl+x and then press Y, and press Enter to comment.

Set Auto-start

sudo nano /etc/rc.local

Add the following before exit 0:

sudo python /home/pi/LCD-Clock-A-Code/rpi/main.py &

Note that you must add "&" to run in the background, otherwise the system may not be able to start.
Lcd clock user manual022.png
Reboot the device:

sudo reboot

Demo

Directory

Lcd clock user manual023.png

  • menupic/: menu picture directory, built-in 2 sets of menu operation interface pictures with white background and black background;
  • numpic/: digital picture directory, built-in 4 sets of digital pictures, used to display the time;
  • main.py: main program;
  • BME280.py: temperature, humidity, and pressure sensor driver;
  • DS3231.py: RTC driver;
  • Font.ttc: font file, used to display temperature and humidity;
  • GPIOCFG.py: button, buzzer driver;
  • __pycache__: The cache directory generated by Python3, is meaningless;
  • ST7789V.py: drivers for 6 LCDs;
  • WS2812.py: RGB lamp driver;

Customize Dial Plate

If you need to customize the dial plate, please open main.py:

sudo nano +18 main.py 

This is the directory of digital picture files. You can change the letters after /numpic/ to four types: A, B, C, D. If you have any custom ones, please create a new directory E or other under /numpic/, code This is also changed to relevant;
Similarly, the custom menu is the same, change the code line 19.
Lcd clock user manual024.png

Resource

Document

ESP32

Program

Software

Development Software

Pico Quick Start

Firmware Download

  • MicroPython Firmware Download

MicroPython Firmware Download.gif

  • C_Blink Firmware Download

C Blink Download.gif

Text Tutorial

Introduction

MicroPython Series

C/C++ Series

For C/C++, it is recommended to use Pico VS Code for development. This is a Microsoft Visual Studio Code extension designed to make it easier for you to create, develop, and debug projects for the Raspberry Pi Pico series development board. Whether you are a beginner or an experienced professional, this tool can help you confidently and easily develop Pico. Below we will introduce how to install and use the extension.

  • Official website tutorial: https://www.raspberrypi.com/news/pico-vscode-extension/.
  • This tutorial is applicable to Raspberry Pi Pico, Pico2, and our company's RP2040 and RP2350 series development boards.
  • The development environment defaults to Windows as an example. For other environments, please refer to the official website tutorial for installation.

Arduino IDE Series

Install Arduino IDE

  1. Download the Arduino IDE installation package from Arduino website.
    RoArm-M1 Tutorial II01.jpg
  2. Just click on "JUST DOWNLOAD".
    Arduino IDE Pico.png
  3. Click to install after downloading.
    RoArm-M1 Tutorial II02.gif
  4. Note: You will be prompted to install the driver during the installation process, we can click Install.

Install Arduino-Pico Core on Arduino IDE

  1. Open Arduino IDE, click the File on the left corner and choose "Preferences".
    RoArm-M1 Tutorial04.jpg
  2. Add the following link in "Additional boards manager URLs", then click OK.
    https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json

    RoArm-M1 Tutorial II05.jpg
    Note: If you already have the ESP32 board URL, you can separate the URLs with commas like this:

    https://dl.espressif.com/dl/package_esp32_index.json,https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
    
  3. Click on Tools -> Board -> Board Manager -> Search for pico, it shows installed since my computer has already installed it.
    Pico Get Start 05.png
    Pico Get Start 06.png

Upload Demo At the First Time

  1. Press and hold the BOOTSET button on the Pico board, connect the Pico to the USB port of the computer via the Micro USB cable, and release the button when the computer recognizes a removable hard drive (RPI-RP2).
    Pico Get Start.gif
  2. Download the demo from #Resource, open the D1-LED.ino under arduino\PWM\D1-LED path.
  3. Click Tools -> Port, remember the existing COM, do not need to click this COM (different computers show different COM, remember the existing COM on your computer).
    UGV1 doenload02EN.png
  4. Connect the driver board to the computer with a USB cable, then click Tools -> Ports, select uf2 Board for the first connection, and after the upload is complete, connecting again will result in an additional COM port.
    UGV1 doenload03EN.png
  5. Click Tools -> Board -> Raspberry Pi Pico/RP2040 -> Raspberry Pi Pico.
    Pico Get Start02.png
  6. After setting, click the right arrow to upload.
    Pico Get Start03.png
    • If you encounter problems during the period, you need to reinstall or replace the Arduino IDE version, uninstall the Arduino IDE clean, after uninstalling the software you need to manually delete all the contents of the folder C:\Users\[name]\AppData\Local\Arduino15 (you need to show the hidden files in order to see it) and then reinstall.


Open Source Demo

FAQ

 Answer:

You need to enable I2C and SPI communication on your Raspberry Pi board.
Enable I2C:
Configure your Pi and enable the I2C:

sudo raspi-config

Select Advanced Options -> I2C -> <YES> to enable the I2C driver by kernel. Then you can check if the I2C is enabled.
Enable SPI:
Configure your Pi and enable the SPI

sudo raspi-config

Select Advanced Options -> SPI -> <YES> to enable the SPI driver by kernel. Then you can check if the SPI is enabled.

https://www.raspberrypi.com/documentation/computers/configuration.html

{{{5}}}


 Answer:

3V CR1220 cell battery.

{{{5}}}


 Answer:

PICO hardware connection image:
LCD-Clock-A-FAQ3.png

{{{5}}}


Support



Technical Support

If you need technical support or have any feedback/review, please click the Submit Now button to submit a ticket, Our support team will check and reply to you within 1 to 2 working days. Please be patient as we make every effort to help you to resolve the issue.
Working Time: 9 AM - 6 PM GMT+8 (Monday to Friday)