From b873d9794c9ef6c3f697cc130c566921616bfe95 Mon Sep 17 00:00:00 2001 From: Gauthier Provost Date: Tue, 28 May 2019 18:15:58 +0800 Subject: [PATCH] Update i2c page following sys-oled update --- docs/i2c.md | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/docs/i2c.md b/docs/i2c.md index 65e3632..b468b67 100644 --- a/docs/i2c.md +++ b/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