Updated PiSugar 3 Series (markdown)

铲屎将军 2022-08-31 12:54:41 +08:00
parent 35099b1716
commit 16ab7d47e2

@ -94,19 +94,19 @@ Click and hold the power button to turn on/off. This feature can be turn off in
<img width="500" title="PiSugar3" src="https://cdn.pisugar.com/img/PiSugar3-5000mah.jpg?imageView2/0/w/800">
</p>
| Position | Name | Description |
| :------------------------ | :---------------: | :---------------: |
| 1 | GND | PiSugar's GND, 0V, all GNDs are connected, if connected to the Raspberry Pi, also directly to the Raspberry Pi's GND |
| 2 | BAT | Battery Positive, 3V-4,2V |
| 3 | USB Input | Input voltage 4.5V-5.2V |
| 4 | Custom function button | |
| 5 | Power button | |
| 6 | System reset button | Use when the hardware is in abnormal state, short press will reset PiSugar |
| 7 | Extension Interface | 5V Output, GND, MDAT/MSCL: I2C main interface, no function at this time. SDAT/SSCL: I2C slave interface, connected to Pi's I2C interface. |
| 8 | 5V Input Pad | Connect to USB interface 5V input |
| 9 | Custom Button Pad | Trigger custom button function when connected to BAT(PAD:2) |
| 10 | Power Button Pad | Trigger power button function when connected to BAT(PAD:2) |
| 11 | 5V Output Pad | Connected to system 5V output, connected to Raspberry Pi 5V |
| Position | Name | Description |
| :------- | :--------------------: | :---------------------------------------------------------------------------------------------------------------------------------------: |
| 1 | GND | PiSugar's GND, 0V, all GNDs are connected, if connected to the Raspberry Pi, also directly to the Raspberry Pi's GND |
| 2 | BAT | Battery Positive, 3V-4,2V |
| 3 | USB Input | Input voltage 4.5V-5.2V |
| 4 | Custom function button | |
| 5 | Power button | |
| 6 | System reset button | Use when the hardware is in abnormal state, short press will reset PiSugar |
| 7 | Extension Interface | 5V Output, GND, MDAT/MSCL: I2C main interface, no function at this time. SDAT/SSCL: I2C slave interface, connected to Pi's I2C interface. |
| 8 | 5V Input Pad | Connect to USB interface 5V input |
| 9 | Custom Button Pad | Trigger custom button function when connected to BAT(PAD:2) |
| 10 | Power Button Pad | Trigger power button function when connected to BAT(PAD:2) |
| 11 | 5V Output Pad | Connected to system 5V output, connected to Raspberry Pi 5V |
* Note: the small round button on the board is for reseting the hardware. It's not an activation button as that on PiSugar 2.
@ -591,3 +591,57 @@ WebUI supports this function.
"i2c_addr"= 48,
**Minimum firmware version: 1.0.6**
## RTC on board
PiSugar 3 have an RTC on board, which can easily use by hwclock.
**Function description**
address: 0x68 as same as ds3231
Data description: The clock part is consistent with ds3231
**Using tutorials**
Take Raspberry Pi OS kernel version: 5.15 as an example, for other system versions, please refer to the operating instructions of ds3231
1. Open I2C port
2. Upgrade pisugar firmware to the latest version
3. Write the following to the /boot/config file:
`dtoverlay=i2c-rtc,ds3231`
The modified file should look like this:
<img width="600" src="https://cdn.pisugar.com/img/config.png">
4. Restart the system
After the above steps, RTC should have been mounted with the system,you can use the following instructions to verify:
Use the following command to view the I2C mounting:
`i2cdetect -y 1`
As a result, the UU mark can be seen at 0x68, indicating that it has been occupied by the system
```
pi@PI4B:~ $ i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- 57 -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
```
Then you can use the hwclock command
```pi@PI4B:~ $ sudo hwclock -r
2022-08-31 12:46:36.849895+08:00
pi@PI4B:~ $ sudo hwclock -w
pi@PI4B:~ $
```