Template:Pico-Clock-Green User Manual

From Waveshare Wiki
Jump to: navigation, search

Setup environment

Please refer to Raspberry Pi's guide: https://www.raspberrypi.org/documentation/pico/getting-started/

Raspberry Pi

  • Open a terminal of Raspberry Pi by SSH or connect the Pi to an HDMI screen.
  • Download and unzip the demo codes to directory Pico C/C++ 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://www.waveshare.net/w/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 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, click Generate, you can find the Pico-Clock-Green.uf2 file in the build folder.
    • 3. Arag the uf2 file into Pico, and then the 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 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 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 press 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, 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.