Zum Inhalt springen

WSAL13890 – 1.3inch OLED HAT/en

Aus JW Tech Wiki
Version vom 6. September 2026, 00:34 Uhr von JWTechPublisher (Diskussion | Beiträge) (Freigegebene technische Dokumentation veröffentlicht; Text-only und noindex)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)

Documentation notice: This technical documentation was independently rewritten from an archived supplier source. Check technical details and commands against the product version and manufacturer documentation before use.

Summary

The Waveshare 1.3-inch OLED HAT is a display module with an SH1106 driver IC and a resolution of 128×64 pixels. It supports 4-wire SPI, 3-wire SPI, and I2C interfaces. Configuration is done via solder jumpers on the back of the module.

Related products at JW Tech

Technical overview

  • Resolution: 128 × 64 pixels; display size: 1.3 inch; outline dimensions: 65 mm × 30 mm.
  • Driver: SH1106; color: blue (monochrome).
  • Interfaces: 4-wire SPI (default), 3-wire SPI, I2C (address 0x3C when DC tied to GND).
  • Communication mode is selected by six resistors on the back: BS0/BS1 determine the mode.
  • Pin mapping: KEY1–KEY3 (P21/P20/P16), joystick (P6/P19/P5/P26/P13), SPI (SCLK P11, MOSI P10, CS P8, DC P24, RST P25), I2C (SCL P3, SDA P2).
  • Operating temperature: -20 to 70 °C; storage temperature: -30 to 80 °C.
  • For Raspberry Pi, the SPI or I2C interface must be enabled via raspi-config.
  • Sample code for C, Python 2, and Python 3 is included in the download package; for Jetson Nano only SPI works due to weak GPIO drive capability.

Commands and examples – verify before use: 

sudo raspi-config
sudo reboot
ls /dev/spi
sudo wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.71.tar.gz
sudo tar zxvf bcm2835-1.71.tar.gz
cd bcm2835-1.71/
sudo ./configure && sudo make && sudo make check && sudo make install
sudo apt-get install wiringpi
wget https://files.waveshare.com/wiki/common/wiringpi-latest.deb
sudo dpkg -i wiringpi-latest.deb
gpio -v
sudo git clone https://github.com/WiringPi/WiringPi
cd WiringPi
sudo ./build
sudo su
wget https://github.com/joan2937/lg/archive/master.zip
unzip master.zip
cd lg-master
sudo make install
sudo apt-get update

Notes and version constraints

  • Default configuration is 4-wire SPI; for I2C the solder jumpers must be changed (BS0 to GND, BS1 to VCC, CS to GND, DC to GND, DIN to SDA, CLK to SCL).
  • When using I2C, the 7-bit slave address is 0x3C, provided DC is tied to GND.
  • The module requires software control to light up – without program output the screen stays dark.
  • Displaying the same image for extended periods can cause afterimages and damage the OLED.
  • Do not connect the power supply in reverse.
  • On Bookworm systems, bcm2835 and wiringPi are unavailable; only lgpio is usable.
  • For Raspberry Pi 4B from raspbian_lite-2019-06-20 onward, add 'gpio=6,19,5,26,13,21,20,16=pu' to /boot/config.txt so the buttons work correctly.
  • For Jetson Nano, only SPI is functional; I2C is not supported due to weak GPIO drive capability.

Source and revision record

  • 1.3inch OLED HAT - Waveshare Wiki
  • Source revision: 74762
  • Captured: 2026-08-30T04:00:03+00:00
  • SHA-256: e9ff871a068d5c5a449abc740a69825962d2aab2b1574f65ddef4772cb4cc483