Pico-Clock-Green

From Waveshare Wiki
Jump to: navigation, search
Pico-Clock-Green
Pico-Clock-Green

Rectangle Electronic Clock For Raspberry Pi Pico
Accurate RTC, Multi Functions, LED Digits
{{{name2}}}

{{{name3}}}

{{{name4}}}

{{{name5}}}

Overview

This product is available in Chinese and English versions and is hardware and software compatible.

Precautions before use: When plugging into the Raspberry Pi Pico, the module's pogo pin needs to be positioned to the TP3 (D+) and TP2 (D-) of the Raspberry Pi Pico.

Introduction

The Pico-Clock-Green is an LED-digit electronic clock designed for Raspberry Pi Pico. It incorporates high-precision RTC chip DS3231, I2C communication interface, photosensor, buzzer, and buttons, and features multiple functions including an accurate electronic clock, temperature display, auto-brightness adjustment, alarm, and button config. The important part is that rich open-source codes and development tutorials are also provided to help you fast get started with Raspberry Pi Pico and make your original electronic clock.

Features

  • Standard Raspberry Pi Pico header, supports Raspberry Pi Pico series.
    • Onboard high precision RTC chip DS3231, with backup battery holder, maintains accurate timekeeping when main power is off.
    • Real-Time Clock Counts Seconds, Minutes, Hours, Date of the Month, Month, Day of the Week, and Year with Leap-Year Compensation Valid Up to 2100.
    • Optional format: 24-hour OR 12-hour with an AM/PM indicator.
    • 2 x programable alarm clock.
    • Digital temperature sensor output: ± 3°C accuracy.
  • Onboard two SM16106 LED display driver chips and one SM5166PLED display control chip on board, which are used to control the display of 8 x 24 matrix LEDs.
  • Embedded photosensor for auto brightness adjustment due to the ambient light, power saving, and eye care
  • Embedded buzzer for alarm or hourly ring, etc.
  • 3 x buttons for configuration.
  • Comes with online development resources and manual (Raspberry Pi Pico C/C++ and MicroPython examples).

Specification

  • Operating Voltage: 3.3V~5V
  • Backup battery voltage: 2.3V ~ 5.5V
  • Operating temperature: -40°C ~ +85°C
  • Power consumption: 100nA

Product Size

Pico-clock-PCB.jpg

Setup environment

1. For the Raspberry Pi environment setting, please refer to link.
2. For the Windows environment setting, please refer to link.
Related resource: Raspberry Pi Pico C/C++ SDK Manual

Raspberry Pi

  • Open a terminal of Raspberry Pi by SSH or press Ctrl+Alt+T at the same time while using the screen to open the terminal.
  • Download and unzip the demo codes to the directory Pico C/C++ SDK. Reference for users who have not yet installed the SDK.
#Note that the directory of SDK may be different for different users, you need to check the actual directory. Generally, it should be ~/pico/.
wget  -P  ~/pico   https://files.waveshare.com/upload/a/ab/Pico-Clock-Green.zip
cd  ~/pico  
unzip Pico-Clock-Green.zip 

C

  • Hold the BOOTSEL button of Pico, and connect the USB interface of Pico to Raspberry Pi then release the button.
  • Compile and run the LCD1602-RGB-Module-demo examples.
cd ~/pico/Pico-Clock-Green/build/
cmake ..
make
sudo mount /dev/sda1 /mnt/pico && sudo cp Pico-Clock-Green.uf2 /mnt/pico/ && sudo sync && sudo umount /mnt/pico && sleep 2

Windows

  • Download and unzip the demo to your Windows desktop, refer to Raspberry Pi's guides to set up the Windows software environment settings.
  • Find the Pico-Clock-Green.uf2 file under the build file under the demo directory, press and hold the BOOTSEL button of Pico, connect the USB of Pico to the PC with a MicroUSB cable, and drag the uf2 file into Pico, and then the Pico will run the demo directly.
  • 【Note】 If some users want to modify the demo, after debugging, you can use the following method to generate a .uf2 file:

1. Copy the Pico-Clocd-Green folder to your pico-examples file directory, and then modify the CMakelists.txt configuration file in the pico-example directory as shown in the figure below.
2. Open Visual Studio Code, open your pico-examples folder, select Pico-Clocd-Green, and click Generate, you can find the Pico-Clock-Green.uf2 file in the build folder.
3. Arag the uf2 file into Pico, and then Pico will run the demo directly.

Pico-Clock-Green002.png

Pico-Clock-Green003.png

Demo Function Descroption

  • Time display interface: The week, hour, and minute can be displayed under the time display interface, supporting the 12/24 hour format.
  • Status bar: The status bar can display the Scroll switch, Alarm switch, Countdown, Temperature (Celsius/Fahrenheit), Timing, Hourly ring, Automatic brightness, and the AM/PM status display will be turned on when the 12-hour clock is displayed.
  • Scrolling display: After the scrolling is turned on, it will scroll every three minutes, and the scrolling will display the year, month, day, hour, and temperature.
  • Temperature display: Display after scrolling on, you can choose Celsius or Fahrenheit display.
  • Alarm clock settings: The alarm clocks are set by week (set the alarm time, select the day of the week on which the alarm will sound).
  • Button sound: You can turn on or off the button sound, bp: ON or bp: OF.
  • Timekeeping: up to 59 minutes and 59 seconds of timekeeping, a beeping sound will be heard when the countdown is connected.
  • Auto Light: After turning on auto-brightness, you can adjust the brightness according to the environment.

Function instructions

  • Button description: There are three buttons from top to next. We define them as Config mode switch, Up-adjusting button, Down-adjusting/Exit button. The short-press time range: <=300ms; the long-press time range >300ms.
  • Button function description:
    • Config mode switch button: short press to switch Setting mode; long press to enter Alarm setting.
    • Up-adjusting button: short press to switch State; long press to enter Timekeeping setting.
    • Down-adjusting/Exit button: short press to switch state; long press to exit to Time display state.
  • Short press the Config mode switch button to switch the normal mode setting. When the status is being switched, the current position will flash 【Including Time, Button sound switch (BP: ON or BP: OF), Scroll switch (DP: ON or DP: OF ), Time display mode (MD:1 12-hour system or MD:2 24-hour system), Hourly ring signal switch (FT: ON or FT: OF)】
  • The Time Setting: Enters the year, month, day, hour, and minute in the normal setting mode. When selected, the current position will flash. Set the time through the Up-adjusting button or Down-adjusting button. When the setting mode is switched/press the Exit button/no operation exit (10 seconds without any operation) ), the current position value will be written to RTC, if the value has never been changed, it will not be overwritten. Note that the second will be cleared when setting.
  • Alarm setting: Loong presses the Config mode switch button to enter the Alarm setting; A0/A1: ON/OF, short press the Up-adjusting and Down-adjusting button to select which alarm clock to set; short press the Config mode switch button to enter the hour and minute setting, and then select the day of the week on which the alarm will sound(the Week state will jump to Monday, select the day of the week through the Up-adjusting and Down-adjusting button), short press the Config mode switch button again, and the alarm will be set successfully.
  • Timekeeping setting: Long press the Up-adjusting button to enter the Time Setting, and select TM.OF/UP/DN through the Up-adjusting button and Down-adjusting button, (OF: off/UP: up counting/DN: down counting);
    • Up counting: The timing result is updated every 3 seconds. When the Config mode switch button is pressed, the counting result will be displayed. Press the Config mode switch button again to return to the time display state;
    • Down Counting: After finishing the time setting, the countdown will start. After the timer expires, the buzzer will be triggered automatically.
  • Celsius/Fahrenheit selection: In the time display state, short press the Up-adjusting button to switch the temperature display mode.
  • Auto Light: In the time display state, short press the Down-adjusting to turn on or off the auto brightness mode.

Resources

Document

Demo

Datasheet

Development Software

Pico Quick Start

Download Firmware

  • MicroPython Firmware Download

MicroPython Firmware Download.gif

  • C_Blink Firmware Download

C Blink Download.gif

Video Tutorial

  • Pico Tutorial I - Basic Introduction

  • Pico Tutorial II - GPIO

  • Pico Tutorial III - PWM

  • Pico Tutorial IV - ADC

  • Pico Tutorial V - UART

  • Pico Tutorial VI - To be continued...

MicroPython Series

C/C++ Series

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 the additional development board manager URL, 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 ESP8266 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 -> Dev Board -> Dev 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, open arduino\PWM\D1-LED path under the D1-LED.ino.
  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 Tool -> Dev 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 needs to be uninstalled cleanly, 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

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 AM GMT+8 (Monday to Friday)