Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

i2c and i2s on rock64

Featured Replies

I have a Rock64 powered by Armbian version 5.60 kernel 4.4.162-rockchip64 Ubuntu Bionic

How can I activate i2c0 and i2s0 ports for connecting a 16x2 characters LCD display like 1602LCD and a PCM5102 DAC ?

I'm trying armbian-config and I'm reading https://docs.armbian.com/User-Guide_Allwinner_overlays/ but I'm getting no help.

Thanks for advance.

  • Author

Useful doc here :

http://synfare.com/599N105E/hwdocs/rock64/index.html

I am trying with Ayufan distribution :

https://github.com/ayufan-rock64/linux-build/releases/download/0.7.9/bionic-minimal-rock64-0.7.9-1067-arm64.img.xz

I have connecting i2c on P27 (i2c1-sda) and P28(i2c1-scl) and 3.3volts and the display is found with "i2cdetect -y 1" on 0x3f.

Now, I have to install lcdproc

Hi,

Have you managed to use I2C with Rock64 ? I will soon have to port part of a project under ESP8266 to Rock64, and I need to use I2C with an Oled SSD1306 controller, thanks in advance for sharing your experience.

  • Author

Yes, I have Rock64 working with I2C and a 20x4 LCD display like this one

Aliexpress

and the dbrgn/RPLCD under Python 3.6.6 (Ubuntu Bionic 18.04) :

git clone https://github.com/bazooka07/RPLCD.git -b test-entrypoint-1811 ( I fix a little bug for the test )

 

I have too an ESP8266 (Nodemcu) and a OLed 0.96" display. I'm trying for running Oled with Rock64.

The following library is working but don't keep  the display on when I leave my script

pip3 install luma.oled

My script :

#!/usr/bin/env python3

from luma.core.interface.serial import i2c, spi
from luma.core.render import canvas
from luma.oled.device import ssd1306

serial = i2c(port=1, address=0x3C)
device = ssd1306(serial)

with canvas(device) as draw:
    draw.rectangle(device.bounding_box, outline='white', fill='black')
    draw.text((30, 40), 'Hello World', fill='white')

Don't forget to connect on i2c-1 pin #27 (sda) and pin #28 (scl) unlike RPI3

 

  • Author

I am testing with the last version of Armbian (Ubuntu Bionic) and it's working fine.

i2c-1 is enabled by default.
 

sudo apt install python3-wheel python3-setuptools python3-dev build-essential

sudo apt install python3-smbus

git clone --depth 1 https://github.com/rm-hull/luma.oled

git clone --depth 1 https://github.com/rm-hull/luma.examples

cd luma.oled/

sudo -H python3 setup.py install

cd ~/luma.examples/examples

python3 welcome.py

Don't forget to add yourself in the "i2c" group and to connect your oled in the P27 (i2c1-sda) and P28(i2c1-scl) and 3.3volts.

sudo usermod -aG i2c your-login

 

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.