Where is existing code for oled

Post Reply
chrisjx
Posts: 15
Joined: Tue Feb 25, 2014 3:21 am
languages_spoken: english
ODROIDs: U3, C1
Has thanked: 0
Been thanked: 0
Contact:

Where is existing code for oled

Post by chrisjx »

I have the HC4 with OLED and I'd like to tweak the existing setup of the OLED which currently shows:

[odroid-hc4]
ip address
mac address

I assume there's a python script that runs this but I don't see any services or python files that might be associated with the setup. Where is the default config for the OLED?

I see the odroid-homecloud - what is that?

I see the luma examples - what is the difference between odroid-homecloud and luma examples?

Thanks for any advice,
Chris.

User avatar
tobetter
Posts: 8193
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 475 times
Been thanked: 1281 times
Contact:

Re: Where is existing code for oled

Post by tobetter »

chrisjx wrote:
Wed Jul 21, 2021 5:53 pm
I have the HC4 with OLED and I'd like to tweak the existing setup of the OLED which currently shows:

[odroid-hc4]
ip address
mac address

I assume there's a python script that runs this but I don't see any services or python files that might be associated with the setup. Where is the default config for the OLED?

I see the odroid-homecloud - what is that?

I see the luma examples - what is the difference between odroid-homecloud and luma examples?

Thanks for any advice,
Chris.
You can refer to the links.
[1] https://github.com/tobetter/odroid-homecloud
[2] https://wiki.odroid.com/odroid-hc4/appl ... d?s[]=oled

[1] is the source code of odroid-homecloud which runs on top of Ubuntu image and [2] is about the OLED display module itself.
odroid-homecloud uses luma which is a python module to handle small device.

chrisjx
Posts: 15
Joined: Tue Feb 25, 2014 3:21 am
languages_spoken: english
ODROIDs: U3, C1
Has thanked: 0
Been thanked: 0
Contact:

Re: Where is existing code for oled

Post by chrisjx »

Thank you for helping.

I see those references, but when I immaged my microsd card with ubuntu, the OLED display already shows some info. It shows, by default:

[ODROID-HC4]
192.168.0.150
{the mac address}

In the documentation I cannot find out where the code is running on my odroid. Is it somewhere in /etc/? /usr/? /var/? How is it currently working on my odroid?

If I am using the [1] and [2] references, I also do not see a .service file to invoke the oled code? I see all kinds of samples and that is good, but where should I install the code, and how should I invoke a service.

Thank you,
Chris.

User avatar
tobetter
Posts: 8193
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 475 times
Been thanked: 1281 times
Contact:

Re: Where is existing code for oled

Post by tobetter »

chrisjx wrote:
Thu Jul 22, 2021 3:14 am
Thank you for helping.

I see those references, but when I immaged my microsd card with ubuntu, the OLED display already shows some info. It shows, by default:

[ODROID-HC4]
192.168.0.150
{the mac address}
This is from the board, user cannot change it. It only displays until real OS starts and update with their own contents.
In the documentation I cannot find out where the code is running on my odroid. Is it somewhere in /etc/? /usr/? /var/? How is it currently working on my odroid?

If I am using the [1] and [2] references, I also do not see a .service file to invoke the oled code? I see all kinds of samples and that is good, but where should I install the code, and how should I invoke a service.

Thank you,
Chris.
I think you have not looked into [1] deeply yet. The service file is in the source tree already.
https://github.com/tobetter/odroid-home ... ay.service

And the source tree [1] is already debian ready, so you can build with python setup or debian tool to create debian package. Also, if you run sudo apt install odroid-homecloud-display, the same code will be installed and the service will start.

chrisjx
Posts: 15
Joined: Tue Feb 25, 2014 3:21 am
languages_spoken: english
ODROIDs: U3, C1
Has thanked: 0
Been thanked: 0
Contact:

Re: Where is existing code for oled

Post by chrisjx »

First off, on my odroid-hc4 I ran your suggested install of odroid-home-cloud to make the oled work. This is what it did and took over 1/2 hour to finish:

Code: Select all

# sudo apt install odroid-homecloud-display

sudo: unable to resolve host arc0.jumano.salt: No address associated with hostname


Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  nodejs-doc
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  fonts-dseg libexpat1-dev libimagequant0 libpython3-dev libpython3.8 libpython3.8-dev libpython3.8-minimal libpython3.8-stdlib libwebpdemux2 python-pip-whl python3-dev python3-olefile python3-pil
  python3-pip python3-setuptools python3-wheel python3.8 python3.8-dev python3.8-minimal
Suggested packages:
  python-pil-doc python3-pil-dbg python-setuptools-doc python3.8-venv python3.8-doc binfmt-support
The following NEW packages will be installed:
  fonts-dseg libexpat1-dev libimagequant0 libpython3-dev libpython3.8 libpython3.8-dev libwebpdemux2 odroid-homecloud-display python-pip-whl python3-dev python3-olefile python3-pil python3-pip
  python3-setuptools python3-wheel python3.8-dev
The following packages will be upgraded:
  libpython3.8-minimal libpython3.8-stdlib python3.8 python3.8-minimal
4 upgraded, 16 newly installed, 0 to remove and 77 not upgraded.
Need to get 13.3 MB of archives.
After this operation, 33.1 MB of additional disk space will be used.
Get:1 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 python3.8 arm64 3.8.10-0ubuntu1~20.04 [387 kB]
Get:2 http://deb.odroid.in/c4 focal/main arm64 odroid-homecloud-display arm64 0.1 [5296 B]
Get:3 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 libpython3.8-stdlib arm64 3.8.10-0ubuntu1~20.04 [1647 kB]
Get:4 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 python3.8-minimal arm64 3.8.10-0ubuntu1~20.04 [1830 kB]
Get:5 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 libpython3.8-minimal arm64 3.8.10-0ubuntu1~20.04 [713 kB]
Get:6 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 python3-setuptools all 45.2.0-1 [330 kB]                                                                                                 
Get:7 http://ports.ubuntu.com/ubuntu-ports focal/universe arm64 python3-wheel all 0.34.2-1 [23.8 kB]                                                                                                 
Get:8 http://ports.ubuntu.com/ubuntu-ports focal-updates/universe arm64 python-pip-whl all 20.0.2-5ubuntu1.6 [1805 kB]                                                                               
Get:9 http://ports.ubuntu.com/ubuntu-ports focal-updates/universe arm64 python3-pip all 20.0.2-5ubuntu1.6 [231 kB]                                                                                   
Get:10 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 libimagequant0 arm64 2.12.2-1.1 [29.3 kB]                                                                                               
Get:11 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 libwebpdemux2 arm64 0.6.1-2ubuntu0.20.04.1 [9376 B]                                                                             
Get:12 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 python3-pil arm64 7.0.0-4ubuntu0.4 [350 kB]                                                                                     
Get:13 http://ports.ubuntu.com/ubuntu-ports focal/universe arm64 fonts-dseg all 0.45-1 [80.4 kB]                                                                                                     
Get:14 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 libexpat1-dev arm64 2.2.9-1build1 [103 kB]                                                                                              
Get:15 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 libpython3.8 arm64 3.8.10-0ubuntu1~20.04 [1491 kB]                                                                              
Get:16 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 libpython3.8-dev arm64 3.8.10-0ubuntu1~20.04 [3755 kB]                                                                          
Get:17 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 libpython3-dev arm64 3.8.2-0ubuntu2 [7236 B]
Get:18 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 python3.8-dev arm64 3.8.10-0ubuntu1~20.04 [511 kB]                                                                              
Get:19 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 python3-dev arm64 3.8.2-0ubuntu2 [1212 B]
Get:20 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 python3-olefile all 0.46-2 [33.7 kB]
Fetched 13.3 MB in 1min 27s (153 kB/s)      
(Reading database ... 96688 files and directories currently installed.)
Preparing to unpack .../00-python3.8_3.8.10-0ubuntu1~20.04_arm64.deb ...
Unpacking python3.8 (3.8.10-0ubuntu1~20.04) over (3.8.5-1~20.04.2) ...
Preparing to unpack .../01-libpython3.8-stdlib_3.8.10-0ubuntu1~20.04_arm64.deb ...
Unpacking libpython3.8-stdlib:arm64 (3.8.10-0ubuntu1~20.04) over (3.8.5-1~20.04.2) ...
Preparing to unpack .../02-python3.8-minimal_3.8.10-0ubuntu1~20.04_arm64.deb ...
Unpacking python3.8-minimal (3.8.10-0ubuntu1~20.04) over (3.8.5-1~20.04.2) ...
Preparing to unpack .../03-libpython3.8-minimal_3.8.10-0ubuntu1~20.04_arm64.deb ...
Unpacking libpython3.8-minimal:arm64 (3.8.10-0ubuntu1~20.04) over (3.8.5-1~20.04.2) ...
Selecting previously unselected package python3-setuptools.
Preparing to unpack .../04-python3-setuptools_45.2.0-1_all.deb ...
Unpacking python3-setuptools (45.2.0-1) ...
Selecting previously unselected package python3-wheel.
Preparing to unpack .../05-python3-wheel_0.34.2-1_all.deb ...
Unpacking python3-wheel (0.34.2-1) ...
Selecting previously unselected package python-pip-whl.
Preparing to unpack .../06-python-pip-whl_20.0.2-5ubuntu1.6_all.deb ...
Unpacking python-pip-whl (20.0.2-5ubuntu1.6) ...
Selecting previously unselected package python3-pip.
Preparing to unpack .../07-python3-pip_20.0.2-5ubuntu1.6_all.deb ...
Unpacking python3-pip (20.0.2-5ubuntu1.6) ...
Selecting previously unselected package libimagequant0:arm64.
Preparing to unpack .../08-libimagequant0_2.12.2-1.1_arm64.deb ...
Unpacking libimagequant0:arm64 (2.12.2-1.1) ...
Selecting previously unselected package libwebpdemux2:arm64.
Preparing to unpack .../09-libwebpdemux2_0.6.1-2ubuntu0.20.04.1_arm64.deb ...
Unpacking libwebpdemux2:arm64 (0.6.1-2ubuntu0.20.04.1) ...
Selecting previously unselected package python3-pil:arm64.
Preparing to unpack .../10-python3-pil_7.0.0-4ubuntu0.4_arm64.deb ...
Unpacking python3-pil:arm64 (7.0.0-4ubuntu0.4) ...
Selecting previously unselected package fonts-dseg.
Preparing to unpack .../11-fonts-dseg_0.45-1_all.deb ...
Unpacking fonts-dseg (0.45-1) ...
Selecting previously unselected package odroid-homecloud-display.
Preparing to unpack .../12-odroid-homecloud-display_0.1_arm64.deb ...
Unpacking odroid-homecloud-display (0.1) ...
Selecting previously unselected package libexpat1-dev:arm64.
Preparing to unpack .../13-libexpat1-dev_2.2.9-1build1_arm64.deb ...
Unpacking libexpat1-dev:arm64 (2.2.9-1build1) ...
Selecting previously unselected package libpython3.8:arm64.
Preparing to unpack .../14-libpython3.8_3.8.10-0ubuntu1~20.04_arm64.deb ...
Unpacking libpython3.8:arm64 (3.8.10-0ubuntu1~20.04) ...
Selecting previously unselected package libpython3.8-dev:arm64.
Preparing to unpack .../15-libpython3.8-dev_3.8.10-0ubuntu1~20.04_arm64.deb ...
Unpacking libpython3.8-dev:arm64 (3.8.10-0ubuntu1~20.04) ...
Selecting previously unselected package libpython3-dev:arm64.
Preparing to unpack .../16-libpython3-dev_3.8.2-0ubuntu2_arm64.deb ...
Unpacking libpython3-dev:arm64 (3.8.2-0ubuntu2) ...
Selecting previously unselected package python3.8-dev.
Preparing to unpack .../17-python3.8-dev_3.8.10-0ubuntu1~20.04_arm64.deb ...
Unpacking python3.8-dev (3.8.10-0ubuntu1~20.04) ...
Selecting previously unselected package python3-dev.
Preparing to unpack .../18-python3-dev_3.8.2-0ubuntu2_arm64.deb ...
Unpacking python3-dev (3.8.2-0ubuntu2) ...
Selecting previously unselected package python3-olefile.
Preparing to unpack .../19-python3-olefile_0.46-2_all.deb ...
Unpacking python3-olefile (0.46-2) ...
Setting up libpython3.8-minimal:arm64 (3.8.10-0ubuntu1~20.04) ...
Setting up python3-setuptools (45.2.0-1) ...
Setting up python3-olefile (0.46-2) ...
Setting up libwebpdemux2:arm64 (0.6.1-2ubuntu0.20.04.1) ...
Setting up python3-wheel (0.34.2-1) ...
Setting up libexpat1-dev:arm64 (2.2.9-1build1) ...
Setting up libimagequant0:arm64 (2.12.2-1.1) ...
Setting up fonts-dseg (0.45-1) ...
Setting up python3.8-minimal (3.8.10-0ubuntu1~20.04) ...
Setting up python-pip-whl (20.0.2-5ubuntu1.6) ...
Setting up libpython3.8-stdlib:arm64 (3.8.10-0ubuntu1~20.04) ...
Setting up python3.8 (3.8.10-0ubuntu1~20.04) ...
Setting up python3-pil:arm64 (7.0.0-4ubuntu0.4) ...
Setting up libpython3.8:arm64 (3.8.10-0ubuntu1~20.04) ...
Setting up python3-pip (20.0.2-5ubuntu1.6) ...
Setting up odroid-homecloud-display (0.1) ...
Collecting luma.core
  Downloading luma.core-2.3.1-py2.py3-none-any.whl (71 kB)
     |████████████████████████████████| 71 kB 113 kB/s 
Collecting luma.oled
  Downloading luma.oled-3.8.1-py2.py3-none-any.whl (32 kB)
Collecting luma.lcd
  Downloading luma.lcd-2.9.0-py2.py3-none-any.whl (25 kB)
Collecting deprecated
  Downloading Deprecated-1.2.12-py2.py3-none-any.whl (9.5 kB)
Collecting pyftdi
  Downloading pyftdi-0.53.2-py3-none-any.whl (141 kB)
     |████████████████████████████████| 141 kB 69 kB/s 
Collecting spidev; platform_system == "Linux"
  Downloading spidev-3.5.tar.gz (10 kB)
Collecting cbor2
  Downloading cbor2-5.4.0.tar.gz (84 kB)
     |████████████████████████████████| 84 kB 32 kB/s 
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Requirement already satisfied: pillow>=4.0.0 in /usr/lib/python3/dist-packages (from luma.core) (7.0.0)
Collecting RPI.GPIO; platform_system == "Linux"
  Downloading RPi.GPIO-0.7.0.tar.gz (30 kB)
Collecting smbus2
  Downloading smbus2-0.4.1-py2.py3-none-any.whl (11 kB)
Collecting wrapt<2,>=1.10
  Downloading wrapt-1.12.1.tar.gz (27 kB)
Collecting pyusb<1.2.0,>=1.0.0
  Downloading pyusb-1.1.0.tar.gz (78 kB)
     |████████████████████████████████| 78 kB 28 kB/s 
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Collecting pyserial>=3.0
  Downloading pyserial-3.5-py2.py3-none-any.whl (90 kB)
     |████████████████████████████████| 90 kB 127 kB/s 
Building wheels for collected packages: spidev, cbor2, RPI.GPIO, wrapt, pyusb
  Building wheel for spidev (setup.py) ... done
  Created wheel for spidev: filename=spidev-3.5-cp38-cp38-linux_aarch64.whl size=45661 sha256=f4eb5ae79d0ff74593059fa545b8c7dea9b7d6219736deb72a6890e4c38a7e75
  Stored in directory: /root/.cache/pip/wheels/97/5c/d8/280b1f544515539364cc56f7ff5ae3fbcba186f4f74649644f
  Building wheel for cbor2 (PEP 517) ... done
  Created wheel for cbor2: filename=cbor2-5.4.0-cp38-cp38-linux_aarch64.whl size=187333 sha256=b30b9808d0cb8564c0116766bf4b2d8e82be715f1c3b569b0ae7a8cdecf4bfb3
  Stored in directory: /root/.cache/pip/wheels/94/b7/28/352ba49e2c5b4c5eae5406152051e0436375403f1dfa95e549
  Building wheel for RPI.GPIO (setup.py) ... done
  Created wheel for RPI.GPIO: filename=RPi.GPIO-0.7.0-cp38-cp38-linux_aarch64.whl size=77067 sha256=7a507183174f549edde1643d9cce9f646fa0153f61824469a79e6c2a7524f121
  Stored in directory: /root/.cache/pip/wheels/e9/28/be/151b023b334391106527be123557a1a9b99f6b19cbd1ce8b48
  Building wheel for wrapt (setup.py) ... done
  Created wheel for wrapt: filename=wrapt-1.12.1-cp38-cp38-linux_aarch64.whl size=77889 sha256=7f42d6fe3818804a86a7110b975e342491f2e455802a5fe5f68c218ffd1a937d
  Stored in directory: /root/.cache/pip/wheels/5f/fd/9e/b6cf5890494cb8ef0b5eaff72e5d55a70fb56316007d6dfe73
  Building wheel for pyusb (PEP 517) ... done
  Created wheel for pyusb: filename=pyusb-1.1.0-py3-none-any.whl size=58041 sha256=560fb1baf7b249dcd22c0c7d6e59960d54394514c7a1b59076873a9ea2be5396
  Stored in directory: /root/.cache/pip/wheels/c5/ab/d8/68f0e719235c5a5f5b0ddb3ef12f3cbe7e2c2706ff56f3f26b
Successfully built spidev cbor2 RPI.GPIO wrapt pyusb
Installing collected packages: wrapt, deprecated, pyusb, pyserial, pyftdi, spidev, cbor2, RPI.GPIO, smbus2, luma.core, luma.oled, luma.lcd
  WARNING: The scripts pyserial-miniterm and pyserial-ports are installed in '/usr/local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed RPI.GPIO-0.7.0 cbor2-5.4.0 deprecated-1.2.12 luma.core-2.3.1 luma.lcd-2.9.0 luma.oled-3.8.1 pyftdi-0.53.2 pyserial-3.5 pyusb-1.1.0 smbus2-0.4.1 spidev-3.5 wrapt-1.12.1
Created symlink /etc/systemd/system/multi-user.target.wants/odroid-homecloud-display.service → /lib/systemd/system/odroid-homecloud-display.service.
Setting up libpython3.8-dev:arm64 (3.8.10-0ubuntu1~20.04) ...
Setting up python3.8-dev (3.8.10-0ubuntu1~20.04) ...
Setting up libpython3-dev:arm64 (3.8.2-0ubuntu2) ...
Setting up python3-dev (3.8.2-0ubuntu2) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for fontconfig (2.13.1-2ubuntu3) ...

Is all this required to make the oled display custom info? Seems like a lot.

Perhaps I should mention, I'm deploying a nodejs/express application (incl: mongodb) to host 60,000 photographs (for now) and eventually hosting 3 or 4 times that number. The second drive is for mirroring the first. Current config uses 2x 1TB drives.

My humble goal was to display the hostname, the ip address, and the total number of photos stored in the system. I see it is now showing the date and time in the oled.

Thank you for your help.

User avatar
tobetter
Posts: 8193
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 475 times
Been thanked: 1281 times
Contact:

Re: Where is existing code for oled

Post by tobetter »

chrisjx wrote:
Fri Jul 23, 2021 2:49 am
First off, on my odroid-hc4 I ran your suggested install of odroid-home-cloud to make the oled work. This is what it did and took over 1/2 hour to finish:

Code: Select all

# sudo apt install odroid-homecloud-display

sudo: unable to resolve host arc0.jumano.salt: No address associated with hostname


Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  nodejs-doc
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  fonts-dseg libexpat1-dev libimagequant0 libpython3-dev libpython3.8 libpython3.8-dev libpython3.8-minimal libpython3.8-stdlib libwebpdemux2 python-pip-whl python3-dev python3-olefile python3-pil
  python3-pip python3-setuptools python3-wheel python3.8 python3.8-dev python3.8-minimal
Suggested packages:
  python-pil-doc python3-pil-dbg python-setuptools-doc python3.8-venv python3.8-doc binfmt-support
The following NEW packages will be installed:
  fonts-dseg libexpat1-dev libimagequant0 libpython3-dev libpython3.8 libpython3.8-dev libwebpdemux2 odroid-homecloud-display python-pip-whl python3-dev python3-olefile python3-pil python3-pip
  python3-setuptools python3-wheel python3.8-dev
The following packages will be upgraded:
  libpython3.8-minimal libpython3.8-stdlib python3.8 python3.8-minimal
4 upgraded, 16 newly installed, 0 to remove and 77 not upgraded.
Need to get 13.3 MB of archives.
After this operation, 33.1 MB of additional disk space will be used.
Get:1 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 python3.8 arm64 3.8.10-0ubuntu1~20.04 [387 kB]
Get:2 http://deb.odroid.in/c4 focal/main arm64 odroid-homecloud-display arm64 0.1 [5296 B]
Get:3 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 libpython3.8-stdlib arm64 3.8.10-0ubuntu1~20.04 [1647 kB]
Get:4 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 python3.8-minimal arm64 3.8.10-0ubuntu1~20.04 [1830 kB]
Get:5 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 libpython3.8-minimal arm64 3.8.10-0ubuntu1~20.04 [713 kB]
Get:6 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 python3-setuptools all 45.2.0-1 [330 kB]                                                                                                 
Get:7 http://ports.ubuntu.com/ubuntu-ports focal/universe arm64 python3-wheel all 0.34.2-1 [23.8 kB]                                                                                                 
Get:8 http://ports.ubuntu.com/ubuntu-ports focal-updates/universe arm64 python-pip-whl all 20.0.2-5ubuntu1.6 [1805 kB]                                                                               
Get:9 http://ports.ubuntu.com/ubuntu-ports focal-updates/universe arm64 python3-pip all 20.0.2-5ubuntu1.6 [231 kB]                                                                                   
Get:10 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 libimagequant0 arm64 2.12.2-1.1 [29.3 kB]                                                                                               
Get:11 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 libwebpdemux2 arm64 0.6.1-2ubuntu0.20.04.1 [9376 B]                                                                             
Get:12 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 python3-pil arm64 7.0.0-4ubuntu0.4 [350 kB]                                                                                     
Get:13 http://ports.ubuntu.com/ubuntu-ports focal/universe arm64 fonts-dseg all 0.45-1 [80.4 kB]                                                                                                     
Get:14 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 libexpat1-dev arm64 2.2.9-1build1 [103 kB]                                                                                              
Get:15 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 libpython3.8 arm64 3.8.10-0ubuntu1~20.04 [1491 kB]                                                                              
Get:16 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 libpython3.8-dev arm64 3.8.10-0ubuntu1~20.04 [3755 kB]                                                                          
Get:17 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 libpython3-dev arm64 3.8.2-0ubuntu2 [7236 B]
Get:18 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 python3.8-dev arm64 3.8.10-0ubuntu1~20.04 [511 kB]                                                                              
Get:19 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 python3-dev arm64 3.8.2-0ubuntu2 [1212 B]
Get:20 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 python3-olefile all 0.46-2 [33.7 kB]
Fetched 13.3 MB in 1min 27s (153 kB/s)      
(Reading database ... 96688 files and directories currently installed.)
Preparing to unpack .../00-python3.8_3.8.10-0ubuntu1~20.04_arm64.deb ...
Unpacking python3.8 (3.8.10-0ubuntu1~20.04) over (3.8.5-1~20.04.2) ...
Preparing to unpack .../01-libpython3.8-stdlib_3.8.10-0ubuntu1~20.04_arm64.deb ...
Unpacking libpython3.8-stdlib:arm64 (3.8.10-0ubuntu1~20.04) over (3.8.5-1~20.04.2) ...
Preparing to unpack .../02-python3.8-minimal_3.8.10-0ubuntu1~20.04_arm64.deb ...
Unpacking python3.8-minimal (3.8.10-0ubuntu1~20.04) over (3.8.5-1~20.04.2) ...
Preparing to unpack .../03-libpython3.8-minimal_3.8.10-0ubuntu1~20.04_arm64.deb ...
Unpacking libpython3.8-minimal:arm64 (3.8.10-0ubuntu1~20.04) over (3.8.5-1~20.04.2) ...
Selecting previously unselected package python3-setuptools.
Preparing to unpack .../04-python3-setuptools_45.2.0-1_all.deb ...
Unpacking python3-setuptools (45.2.0-1) ...
Selecting previously unselected package python3-wheel.
Preparing to unpack .../05-python3-wheel_0.34.2-1_all.deb ...
Unpacking python3-wheel (0.34.2-1) ...
Selecting previously unselected package python-pip-whl.
Preparing to unpack .../06-python-pip-whl_20.0.2-5ubuntu1.6_all.deb ...
Unpacking python-pip-whl (20.0.2-5ubuntu1.6) ...
Selecting previously unselected package python3-pip.
Preparing to unpack .../07-python3-pip_20.0.2-5ubuntu1.6_all.deb ...
Unpacking python3-pip (20.0.2-5ubuntu1.6) ...
Selecting previously unselected package libimagequant0:arm64.
Preparing to unpack .../08-libimagequant0_2.12.2-1.1_arm64.deb ...
Unpacking libimagequant0:arm64 (2.12.2-1.1) ...
Selecting previously unselected package libwebpdemux2:arm64.
Preparing to unpack .../09-libwebpdemux2_0.6.1-2ubuntu0.20.04.1_arm64.deb ...
Unpacking libwebpdemux2:arm64 (0.6.1-2ubuntu0.20.04.1) ...
Selecting previously unselected package python3-pil:arm64.
Preparing to unpack .../10-python3-pil_7.0.0-4ubuntu0.4_arm64.deb ...
Unpacking python3-pil:arm64 (7.0.0-4ubuntu0.4) ...
Selecting previously unselected package fonts-dseg.
Preparing to unpack .../11-fonts-dseg_0.45-1_all.deb ...
Unpacking fonts-dseg (0.45-1) ...
Selecting previously unselected package odroid-homecloud-display.
Preparing to unpack .../12-odroid-homecloud-display_0.1_arm64.deb ...
Unpacking odroid-homecloud-display (0.1) ...
Selecting previously unselected package libexpat1-dev:arm64.
Preparing to unpack .../13-libexpat1-dev_2.2.9-1build1_arm64.deb ...
Unpacking libexpat1-dev:arm64 (2.2.9-1build1) ...
Selecting previously unselected package libpython3.8:arm64.
Preparing to unpack .../14-libpython3.8_3.8.10-0ubuntu1~20.04_arm64.deb ...
Unpacking libpython3.8:arm64 (3.8.10-0ubuntu1~20.04) ...
Selecting previously unselected package libpython3.8-dev:arm64.
Preparing to unpack .../15-libpython3.8-dev_3.8.10-0ubuntu1~20.04_arm64.deb ...
Unpacking libpython3.8-dev:arm64 (3.8.10-0ubuntu1~20.04) ...
Selecting previously unselected package libpython3-dev:arm64.
Preparing to unpack .../16-libpython3-dev_3.8.2-0ubuntu2_arm64.deb ...
Unpacking libpython3-dev:arm64 (3.8.2-0ubuntu2) ...
Selecting previously unselected package python3.8-dev.
Preparing to unpack .../17-python3.8-dev_3.8.10-0ubuntu1~20.04_arm64.deb ...
Unpacking python3.8-dev (3.8.10-0ubuntu1~20.04) ...
Selecting previously unselected package python3-dev.
Preparing to unpack .../18-python3-dev_3.8.2-0ubuntu2_arm64.deb ...
Unpacking python3-dev (3.8.2-0ubuntu2) ...
Selecting previously unselected package python3-olefile.
Preparing to unpack .../19-python3-olefile_0.46-2_all.deb ...
Unpacking python3-olefile (0.46-2) ...
Setting up libpython3.8-minimal:arm64 (3.8.10-0ubuntu1~20.04) ...
Setting up python3-setuptools (45.2.0-1) ...
Setting up python3-olefile (0.46-2) ...
Setting up libwebpdemux2:arm64 (0.6.1-2ubuntu0.20.04.1) ...
Setting up python3-wheel (0.34.2-1) ...
Setting up libexpat1-dev:arm64 (2.2.9-1build1) ...
Setting up libimagequant0:arm64 (2.12.2-1.1) ...
Setting up fonts-dseg (0.45-1) ...
Setting up python3.8-minimal (3.8.10-0ubuntu1~20.04) ...
Setting up python-pip-whl (20.0.2-5ubuntu1.6) ...
Setting up libpython3.8-stdlib:arm64 (3.8.10-0ubuntu1~20.04) ...
Setting up python3.8 (3.8.10-0ubuntu1~20.04) ...
Setting up python3-pil:arm64 (7.0.0-4ubuntu0.4) ...
Setting up libpython3.8:arm64 (3.8.10-0ubuntu1~20.04) ...
Setting up python3-pip (20.0.2-5ubuntu1.6) ...
Setting up odroid-homecloud-display (0.1) ...
Collecting luma.core
  Downloading luma.core-2.3.1-py2.py3-none-any.whl (71 kB)
     |████████████████████████████████| 71 kB 113 kB/s 
Collecting luma.oled
  Downloading luma.oled-3.8.1-py2.py3-none-any.whl (32 kB)
Collecting luma.lcd
  Downloading luma.lcd-2.9.0-py2.py3-none-any.whl (25 kB)
Collecting deprecated
  Downloading Deprecated-1.2.12-py2.py3-none-any.whl (9.5 kB)
Collecting pyftdi
  Downloading pyftdi-0.53.2-py3-none-any.whl (141 kB)
     |████████████████████████████████| 141 kB 69 kB/s 
Collecting spidev; platform_system == "Linux"
  Downloading spidev-3.5.tar.gz (10 kB)
Collecting cbor2
  Downloading cbor2-5.4.0.tar.gz (84 kB)
     |████████████████████████████████| 84 kB 32 kB/s 
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Requirement already satisfied: pillow>=4.0.0 in /usr/lib/python3/dist-packages (from luma.core) (7.0.0)
Collecting RPI.GPIO; platform_system == "Linux"
  Downloading RPi.GPIO-0.7.0.tar.gz (30 kB)
Collecting smbus2
  Downloading smbus2-0.4.1-py2.py3-none-any.whl (11 kB)
Collecting wrapt<2,>=1.10
  Downloading wrapt-1.12.1.tar.gz (27 kB)
Collecting pyusb<1.2.0,>=1.0.0
  Downloading pyusb-1.1.0.tar.gz (78 kB)
     |████████████████████████████████| 78 kB 28 kB/s 
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Collecting pyserial>=3.0
  Downloading pyserial-3.5-py2.py3-none-any.whl (90 kB)
     |████████████████████████████████| 90 kB 127 kB/s 
Building wheels for collected packages: spidev, cbor2, RPI.GPIO, wrapt, pyusb
  Building wheel for spidev (setup.py) ... done
  Created wheel for spidev: filename=spidev-3.5-cp38-cp38-linux_aarch64.whl size=45661 sha256=f4eb5ae79d0ff74593059fa545b8c7dea9b7d6219736deb72a6890e4c38a7e75
  Stored in directory: /root/.cache/pip/wheels/97/5c/d8/280b1f544515539364cc56f7ff5ae3fbcba186f4f74649644f
  Building wheel for cbor2 (PEP 517) ... done
  Created wheel for cbor2: filename=cbor2-5.4.0-cp38-cp38-linux_aarch64.whl size=187333 sha256=b30b9808d0cb8564c0116766bf4b2d8e82be715f1c3b569b0ae7a8cdecf4bfb3
  Stored in directory: /root/.cache/pip/wheels/94/b7/28/352ba49e2c5b4c5eae5406152051e0436375403f1dfa95e549
  Building wheel for RPI.GPIO (setup.py) ... done
  Created wheel for RPI.GPIO: filename=RPi.GPIO-0.7.0-cp38-cp38-linux_aarch64.whl size=77067 sha256=7a507183174f549edde1643d9cce9f646fa0153f61824469a79e6c2a7524f121
  Stored in directory: /root/.cache/pip/wheels/e9/28/be/151b023b334391106527be123557a1a9b99f6b19cbd1ce8b48
  Building wheel for wrapt (setup.py) ... done
  Created wheel for wrapt: filename=wrapt-1.12.1-cp38-cp38-linux_aarch64.whl size=77889 sha256=7f42d6fe3818804a86a7110b975e342491f2e455802a5fe5f68c218ffd1a937d
  Stored in directory: /root/.cache/pip/wheels/5f/fd/9e/b6cf5890494cb8ef0b5eaff72e5d55a70fb56316007d6dfe73
  Building wheel for pyusb (PEP 517) ... done
  Created wheel for pyusb: filename=pyusb-1.1.0-py3-none-any.whl size=58041 sha256=560fb1baf7b249dcd22c0c7d6e59960d54394514c7a1b59076873a9ea2be5396
  Stored in directory: /root/.cache/pip/wheels/c5/ab/d8/68f0e719235c5a5f5b0ddb3ef12f3cbe7e2c2706ff56f3f26b
Successfully built spidev cbor2 RPI.GPIO wrapt pyusb
Installing collected packages: wrapt, deprecated, pyusb, pyserial, pyftdi, spidev, cbor2, RPI.GPIO, smbus2, luma.core, luma.oled, luma.lcd
  WARNING: The scripts pyserial-miniterm and pyserial-ports are installed in '/usr/local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed RPI.GPIO-0.7.0 cbor2-5.4.0 deprecated-1.2.12 luma.core-2.3.1 luma.lcd-2.9.0 luma.oled-3.8.1 pyftdi-0.53.2 pyserial-3.5 pyusb-1.1.0 smbus2-0.4.1 spidev-3.5 wrapt-1.12.1
Created symlink /etc/systemd/system/multi-user.target.wants/odroid-homecloud-display.service → /lib/systemd/system/odroid-homecloud-display.service.
Setting up libpython3.8-dev:arm64 (3.8.10-0ubuntu1~20.04) ...
Setting up python3.8-dev (3.8.10-0ubuntu1~20.04) ...
Setting up libpython3-dev:arm64 (3.8.2-0ubuntu2) ...
Setting up python3-dev (3.8.2-0ubuntu2) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for fontconfig (2.13.1-2ubuntu3) ...

Is all this required to make the oled display custom info? Seems like a lot.
Yes, it's a lot and they have huge package dependencies.
Perhaps I should mention, I'm deploying a nodejs/express application (incl: mongodb) to host 60,000 photographs (for now) and eventually hosting 3 or 4 times that number. The second drive is for mirroring the first. Current config uses 2x 1TB drives.
Thank you for sharing your use case.
My humble goal was to display the hostname, the ip address, and the total number of photos stored in the system. I see it is now showing the date and time in the oled.

Thank you for your help.
I wish you have changed the python code to display such information for user needs. :)
Thanks.

User avatar
mad_ady
Posts: 9563
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 604 times
Been thanked: 697 times
Contact:

Re: Where is existing code for oled

Post by mad_ady »

Sadly most of my odroids are offline right now (I'm repainting the house), so I can't check, but I did track down the script that handles the clock.
The systemd service will take you to the binary in /usr/bin or /usr/local/bin, but all that does is to load a custom python module. You'll need to run find / -name "*homecloud* (or something similar) and you'll eventually track it down somewhere in python's modules.
You can tweak it, but it will get overritten on system updates.

Best advice is to use the luma examples (they have huge dependencies, I know) and write your own script to periodically refresh the display. Disable odroid-homecloud.

Show us how it looks in the end.

One idea I had when hc4 was launched (for which I didn't have time) was to cycle the display through some stats that were over a limit (e.g. show i/o usage above a specific iops level, or display the name of the file that has top iops)...

Post Reply

Return to “Ubuntu”

Who is online

Users browsing this forum: No registered users and 2 guests