more G-Labs products

Author Topic: SSD 1306 OLED Display + Eden demo app  (Read 2317 times)

December 20, 2014, 08:25:43 PM
Read 2317 times

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
Hello,

this is the app for controlling an SSD 1306 OLED display attacched to Raspberry Pi I2C.

The following is the implemented API.

Calling from HTTP

/api/Components.Ssd1306/0/Oled.DisplayClear
clear the display

/api/Components.Ssd1306/0/Oled.DisplayInvert
inverted mode (black foreground on white background)

/api/Components.Ssd1306/0/Oled.DisplayNormal
normal mode (white foreground on black background)

/api/Components.Ssd1306/0/Oled.DisplayOn
Turn display On

/api/Components.Ssd1306/0/Oled.DisplayOff
Turn display Off

/api/Components.Ssd1306/0/Oled.GoTo/<x>/<y>
Position the cursor at <x> row (0-15) and <y> column (0-7)

/api/Components.Ssd1306/0/Oled.DrawLogo
Draw HomeGenie logo

/api/Components.Ssd1306/0/Oled.DrawText/<text>/<align>
Display <text>. Optionally the text is aligned if <align> is set to LEFT, RIGHT or CENTER.

/api/Components.Ssd1306/0/Oled.DrawNumber/<text>
Display big number (used for displaying sensor values and such)

Calling from an automation program

Code: [Select]
var oled = Modules.InDomain("Components.Ssd1306").WithAddress("0");
oled.Command("Oled.DrawText").Execute("Hello World!/CENTER");

Also there's the Eden demo app that is using the display for showing temperature, luminance, outside weather and date.

The attacched apps are now included by HomeGenie update r450, so no need to download them if you update HG.

Enjoy!
g.
« Last Edit: December 22, 2014, 01:35:47 PM by Gene »


There are no comments for this topic. Do you want to be the first?