0.96" I2C IIC SPI Serial 128X64 White OLED LCD LED

Post Reply
marius
Site Admin
Posts: 18
Joined: Tue Sep 10, 2019 2:21 pm

0.96" I2C IIC SPI Serial 128X64 White OLED LCD LED

Post by marius » Thu Sep 26, 2019 6:32 pm

I did this on Orange PI.

I took this repository

Code: Select all

https://github.com/bitbank2/oled_96
I don't remember doing some changes except the sample.c file.

Here is a _imgs/oled96.tar.gz having my changes for sample.c.

The sample.c file loops forever, trying to read the content of /tmp/oled
file each 30 ms or so. If the file has a content as:


Code: Select all

F,C,L,T\n<F,C,L,T\>
where
  • F - is font index 0 to 3 (0 large, 3 small)
  • C - is column position from 0 to whatever, depending of the font size
  • L - is line position, from 0 to whatever, depending of the font size
  • T - is the text to display.
Any other program can update the /tmp/oled file by putting data into it.

This cat would

Code: Select all

marius@orangepizero:~$ echo -e "1,0,0,line 1 \n2,2,3,line 23" > /tmp/oled
show this on the display.

Image

The wiring diagram


Image

and a picture of it

Image







Disclaimer: This post uses images from https://www.armbian.com/

marius
Site Admin
Posts: 18
Joined: Tue Sep 10, 2019 2:21 pm

Re: 0.96" I2C IIC SPI Serial 128X64 White OLED LCD LED

Post by marius » Mon Oct 21, 2019 3:42 pm

Sam thing on Beaglebone

Code: Select all

marius@beaglebone:~/oled/oled_bbb_bsd$ config-pin P9.19 i2c
marius@beaglebone:~/oled/oled_bbb_bsd$ config-pin P9.20 i2c
https://redypis.org/phpBB3/_imgs/oled_ ... ux.tar.gz

Run it:

Code: Select all

make
marius@beaglebone:~/oled/oled_bbb_bsd$ config-pin P9.19 i2c
marius@beaglebone:~/oled/oled_bbb_bsd$ config-pin P9.20 i2c
sudo ./sample 2 &
echo 2,2,2,sometext > /tmp/oled
Image

Image

Post Reply