Google Chat: zj734465502@gmail.com
+86-0755-88291180
sales01@spotpear.com
dragon_manager@163.com
services01@spotpear.com
manager01@spotpear.com
WhatsApp:13246739196
This is an RTC WatchDog HAT (B) designed for Raspberry Pi with high-precision RTC and watchdog HAT, which refreshes and counts at a limited time and the watchdog circuit can reset the system.
#Open the Raspberry Pi terminal and run the following command wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.71.tar.gz tar zxvf bcm2835-1.71.tar.gz cd bcm2835-1.71/ sudo ./configure && sudo make && sudo make check && sudo make install # For more, you can refer to the official website at: http://www.airspayce.com/mikem/bcm2835/
#Open the Raspberry Pi terminal and run the following command cd sudo apt-get install wiringpi #For Raspberry Pi systems after May 2019 (earlier than that can be executed without), an upgrade may be required: wget https://project-downloads.drogon.net/wiringpi-latest.deb sudo dpkg -i wiringpi-latest.deb gpio -v # Run gpio -v and version 2.52 will appear, if it doesn't it means there was an installation error # Bullseye branch system using the following command: git clone https://github.com/WiringPi/WiringPi cd WiringPi . /build gpio -v # Run gpio -v and version 2.70 will appear, if it doesn't it means there was an installation error
#Python2 sudo apt-get update sudo apt-get install ttf-wqy-zenhei sudo apt-get install python-pip sudo pip install RPi.GPIO sudo pip install spidev #Python3 sudo apt-get update sudo apt-get install ttf-wqy-zenhei sudo apt-get install python3-pip sudo pip3 install RPi.GPIO sudo pip3 install spidev
wget https://files.waveshare.com/wiki/RTC-WatchDog-HAT-(B)/RTC_WatchDog_HAT_B_Demo.zip unzip RTC_WatchDog_HAT_B_Demo.zip sudo chmod 777 -R RTC_WatchDog_HAT_B_Demo
cd ~ cd RTC_WatchDog_HAT_B_Demo/Raspberrypi/RTC/c/ make clean make -j8 sudo ./main
cd ~ cd RTC_WatchDog_HAT_B_Demo/Raspberrypi/RTC/python/examples/ #Set RTC time and display the time, date, and temperature in the cycle sudo python main.py #synchronize the RTC time to the system without network sudo python Set_system_time.py
sudo nano /etc/rc.local #Enter the following commands between fi and exit 0, save and exit. The watchdog demo will automatically run when it boots the next time cd /home/pi/RTC_WatchDog_HAT_B_Demo/Raspberrypi/RTC/python/examples/ sudo python Set_system_time.py & #cd /home/pi/... pi is the username that you can set by yourself
Note that you do not need to use the above demo if you use this method.
Modify the /boot/config.txt by adding the following line at the end:
dtoverlay=i2c-rtc,ds3231
Synchronize System Clock -> Hardware Clock.
sudo hwclock -w
Synchronize Hardware Clock -> System Clock.
sudo hwclock -s
#Disable the network or the time synchronization via the network, otherwise, the time can not be set.
Set the hardware clock time:
sudo hwclock --set --date="9/8/2021 16:45:05"
View the hardware clock.
sudo hwclock -r
Display version information.
sudo hwclock --verbose
cd ~ cd RTC_WatchDog_HAT_B_Demo/Raspberrypi/WatchDog/c make clean make -j8 sudo ./main
cd ~ cd RTC_WatchDog_HAT_B_Demo/Raspberrypi/WatchDog/python sudo python WatchDog_Demo.py
sudo apt update sudo apt install nano -y sudo apt install python3-pip pip3 install Jetson.GPIO pip3 install smbus
wget https://files.waveshare.com/wiki/RTC-WatchDog-HAT-(B)/RTC_WatchDog_HAT_B_Demo.zip unzip RTC_WatchDog_HAT_B_Demo.zip sudo chmod 777 -R RTC_WatchDog_HAT_B_Demo
cd ~ cd RTC_WatchDog_HAT_B_Demo/Jetson_nano/RTC/c/ make clean make -j8 sudo ./main
cd /home/User/RTC_WatchDog_HAT_B/Jetson_nano/ #User is the host's username, set it to your own username, for example, my username is: jetson #Input the command: cd /home/jetson/RTC_WatchDog_HAT_B/Jetson_nano/ #You need to change User to your own username in the following two files sudo chmod 777 start.sh sudo chmod 777 start.service sudo cp start.service /etc/systemd/system systemctl daemon-reload systemctl enable start.service sudo reboot