S-0007

From 52Pi Wiki
Jump to navigation Jump to search

PiOLED (0.91 Inch OLED Module)

OLED4.jpg

Description

This display is made of 128x32 individual OLED pixels.
It communicates with Raspberry pi or Arduino series products via I2C protocol.
Compatible with most of MCU which support I2C protocol support.
There are mounting hole and female pin header on the PCB, so that you can fixed it to Raspberry Pi with screws and nuts.

Features

  • Easy to use
  • Low power consumption
  • Easy to assemble and fixed
  • Less GPIO pin occupation

Specifications

  • Device Register Address: 0x3c
  • Resolution: 128 x 32
  • Work Voltage: 3.3V
  • Communication Protocol: I2C
  • FP frequency: less than 1 fps
  • Wide range of operating temperature: -40°C to 85°C

Dimension

OLED7.jpg


Gallery

OLED1.jpg
OLED2.jpg
OLED3.jpg

Package Includes

  • 2* 0.91 Inch OLED Module
  • 2* 5Pin male to female breadboard wire

How to use

How to wire it up

Connect OLED module to Raspberry Pi's GPIO(3.3v,SDA,SCL,GND)

Pin Definitions

OLEDDef8.jpg



How to program it

For Raspberry Pi 4B

  • Turn on i2c function by using:

sudo raspi-config -> interface options -> i2c -> enable -> yes
.

  • Check if the screen has been recognized by Raspberry Pi
i2cdetect -y 1 
    • If encount command not found error, please install i2c-tools by using:
 sudo apt update && sudo apt -y install i2c-tools
  • Install dependencies libraries:
sudo apt -y install python3 python3-pip python3-pil libjpeg-dev zlib1g-dev libfreetype6-dev liblcms2-dev libopenjp2-7 libtiff5
  • Grant privilleges to user pi
sudo usermod -a -G gpio,i2c pi
  • Download sample code from this repo:
git clone https://github.com/rm-hull/luma.examples.git
cd luma.examples/
  • Install the dependencies
sudo -H pip3 install -e . 
  • Entering into example folder and test it.
cd luma.examples/examples/
python3 sys_info.py
  • You should seen this screen on OLED.

FAQ

  • Question: why does it not show anything that I've tried as your instruction?
    • Answer: Please make sure you have already open your i2c function and you can use this command to detect whether it has been turned on already.
    • i2cdetect -y 1

Application Senario

  • There is a maker made a funny thing called "mobile pi" with this 0.91 Inch OLED Module, you can check it by accessing following link:

[Mobile Pi | https://www.instructables.com/id/My-Fantastic-MobilePi/ ]