SSD1306 :: Parent

SSD1306 :: Parent POM

Лицензия

Лицензия

Группа

Группа

org.bidib.eu.ondryaso
Идентификатор

Идентификатор

ssd1306-parent
Последняя версия

Последняя версия

1.0
Дата

Дата

Тип

Тип

pom
Описание

Описание

SSD1306 :: Parent
SSD1306 :: Parent POM
Ссылка на сайт

Ссылка на сайт

https://github.com/akuhtz/pi-ssd1306-java.git
Система контроля версий

Система контроля версий

https://github.com/akuhtz/pi-ssd1306-java.git

Скачать ssd1306-parent

Имя Файла Размер
ssd1306-parent-1.0.pom 11 KB
Обзор

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.bidib.eu.ondryaso/ssd1306-parent/ -->
<dependency>
    <groupId>org.bidib.eu.ondryaso</groupId>
    <artifactId>ssd1306-parent</artifactId>
    <version>1.0</version>
    <type>pom</type>
</dependency>
// https://jarcasting.com/artifacts/org.bidib.eu.ondryaso/ssd1306-parent/
implementation 'org.bidib.eu.ondryaso:ssd1306-parent:1.0'
// https://jarcasting.com/artifacts/org.bidib.eu.ondryaso/ssd1306-parent/
implementation ("org.bidib.eu.ondryaso:ssd1306-parent:1.0")
'org.bidib.eu.ondryaso:ssd1306-parent:pom:1.0'
<dependency org="org.bidib.eu.ondryaso" name="ssd1306-parent" rev="1.0">
  <artifact name="ssd1306-parent" type="pom" />
</dependency>
@Grapes(
@Grab(group='org.bidib.eu.ondryaso', module='ssd1306-parent', version='1.0')
)
libraryDependencies += "org.bidib.eu.ondryaso" % "ssd1306-parent" % "1.0"
[org.bidib.eu.ondryaso/ssd1306-parent "1.0"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

  • pi-ssd1306-core
  • pi-ssd1306-demo

Java SSD1306 library

Java library for controlling SSD1306-based OLED display (usually the 0.96" mini OLEDs). It's not exactly the fastest thing, but it works quite well.

Based on Adafruit_Python_SSD1306.

You'll need Pi4J library.

Build a JAR file with maven

You need Maven to use the following procedure. Perform the following in the project root folder.

  1. Create the JAR file with the following command: mvn clean package
  2. Start example: sudo java -classpath .:/opt/pi4j/lib/'*' -jar target/ssd1306-0.0.1-SNAPSHOT.jar

This will execute class Pixels which tries to draw a sample image via SPI on the OLED. In case you want to try the I2C bus version (PixelsI2c), execute the following command:

sudo java -classpath .:./target/ssd1306-0.0.1-SNAPSHOT.jar:/opt/pi4j/lib/'*' eu.ondryaso.ssd1306.examples.PixelsI2c

For performance reasons, it is advised to build the JAR on a PC and copy the file afterwards to the Raspberry PI. In case the commands are executed from the same folder where the JAR is located, the target/ has to be omitted.

Connecting

You just have to connect your display to the Raspberry Pi SPI (or I2C) pins. I haven't got the I2C thus I don't know if it'll work. Probably not. Reset pin is not always present and it's not necessary for function. You can use this website for reference.

SPI connection:

Board pin name Physical RPi pin RPi pin name WiringPi pin
DC 16 GPIO23 4
CS 24 GPIO8, CE0 10
MOSI/Data 19 GPIO10, MOSI 12
RST 22 GPIO22 3
CLK 23 GPIO11, SCKL 14
GND 6, 9, 20, 25 Ground
VCC/3V3 1 3V3

I2C connection:

Board pin name Physical RPi pin RPi pin name WiringPi pin
RST 22 GPIO22 3
SDA 3 GPIO2, SDA 8
SCL 5 GPIO3, SCL 9
GND 6, 9, 20, 25 Ground
VCC/3V3 1 3V3

Remember that Pi4J is using WiringPi numbering.

Usage

There are JavaDoc comments in the Display class itself, it should be pretty simple. Also, you can look to the examples.

Версии библиотеки

Версия
1.0