Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

machinekoder/qml-oled-renderer

Repository files navigation

QML OLED Renderer

Renders a QML application to a SSD1306 OLED display.

OLED Display

import QtQuick 2.6
Item {
 id: root
 visible: true
 width: 128
 height: 64
 Rectangle {
 id: indicator
 anchors.bottom: parent.bottom
 anchors.bottomMargin: 5
 x: 5
 width: 15
 height: width
 radius: width / 2
 color: "black"
 }
 Text {
 anchors.centerIn: parent
 text: "Hello World!"
 }
}

Tested on the CHIP single board computer conected to TWI2.

CHIP Setup

Install

Requires Qt Version 5.4 or higher. For the Debian package install this means that you need at least the packages from Debian Stretch.

sudo apt install qtdeclarative5-dev qt5-default qtchooser qtbase5-dev qml-module-qtquick2

Then you can install the qml-oled-renderer with:

qmake
make
sudo make install

Usage

sage: qml-oled-renderer [options] source
Renders QML applications to a SSD1306 OLED display
Options:
 -h, --help Displays this help.
 -w, --width <weight> OLED screen width
 -b, --bus <bus> I2C bus to which the OLED is connected
 -a, --address <address> I2C address of the OLED screen
 -f, --fps <fps> Number of frames to render per second
Arguments:
 source QML source file`

The OLED renderer does not work without any display device. You can easily create visual framebuffer device using XVfb:

sudo apt-get install xvfb

And the start the application as follows:

Xvfb -shmem -screen 0 128x64x16 &
DISPLAY=:0 qml-oled-renderer main.qml

About

Renders QML applications to an SSD1309 OLED screen

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /