Update i2c page following sys-oled update
This commit is contained in:
parent
a4fe9456a6
commit
b873d9794c
1 changed files with 17 additions and 10 deletions
27
docs/i2c.md
27
docs/i2c.md
|
@ -81,28 +81,35 @@ sudo sys-oled --display sh1106
|
|||
|
||||
Supported values : ssd1306 (default), ssd1322, ssd1325, ssd1327, ssd1331, ssd1351, sh1106.
|
||||
|
||||
Once you know which display model is the correct one, edit */usr/local/etc/sys-oled.conf* and update the **DISPLAY=** line.
|
||||
Once you know which display model is the correct one, edit */etc/sys-oled.conf* and update the **display_model=** line.
|
||||
|
||||
|
||||
#### 2. Configure storage info
|
||||
#### 2. Configure display info
|
||||
|
||||
For now **sys-oled** is a very crude python app that will require you to edit it directly in order to customize what you want to display.
|
||||
|
||||
Edit **sys-oled** script and look for the *status()* function.
|
||||
By default **sys-oled** will display usage info of your micro SDcard which is most probably your Root File System. You can display storage usage info of one more storage device by editing */etc/sys-oled.conf*
|
||||
|
||||
```
|
||||
sudo nano /usr/local/bin/sys-oled
|
||||
sudo nano /etc/sys-oled.conf
|
||||
```
|
||||
|
||||
You can edit the following lines to define for which storage devices you want to display info.
|
||||
You can edit the following lines to define for which storage devices you want to display usage info.
|
||||
|
||||
```
|
||||
d.text((0, 27), disk_usage('sd', '/'), font=font, fill="white")
|
||||
d.text((0, 39), disk_usage('md0', '/mnt/md0'), font=font, fill="white")
|
||||
# Storage Device 1
|
||||
# Device name
|
||||
storage1_name = sd
|
||||
|
||||
# Device mount path
|
||||
storage1_path = /
|
||||
|
||||
# Storage Device 2
|
||||
storage2_name= md0
|
||||
storage2_path= /mnt/md0
|
||||
|
||||
```
|
||||
|
||||
In the above example, we are displaying **sd** (SDcard) usage which is the rootfs mounted on *'/'*. We are also displaying **md0** (RAID array) that is mounted on *'/mnt/mnd0'*.
|
||||
The values *(0, 27)* and *(0, 39)* correspond to the X, Y positions of displayed texts.
|
||||
|
||||
|
||||
#### 3. Start the service
|
||||
|
||||
|
|
Loading…
Reference in a new issue