Giter Site home page Giter Site logo

oled_96's Introduction

This code is now deprecated

Please use my newer OLED library --> ss_oled
It includes both Arduino and Linux support

https://github.com/bitbank2/ss_oled

** OLED_96 **

OLED_96 is a simple C library for working with SSD1306/SH1106 OLED displays when connected to the I2C bus. Tested on various ARM SBCs and Arduinos. The idea is to provide a simple interface for C programmers to make use of those low-cost OLED displays without having to read the data sheet or figure out I2C programming.

Written by Larry Bank
Project started 1/15/2017
[email protected]

Latest Changes:
---------------
The Linux version now supports the 3 display sizes
The Arduino version now includes support for my BitBang_I2C library so that any
two GPIO pins can be used to drive the display.
The library now supports 3 sizes of SSD1306 displays (and SH1106): 132x64, 128x64, 128x32, and 64x32

Features:
--------

  • Efficient individual pixel drawing
  • Small, Medium and large fonts (6x8, 8x8, 16x32)
  • Invert and flip 180 options (entire display)
  • Optional inverted text
  • Brightness control
  • Support for 64x32, 128x32, 128x64 and 132x64 (SH1106) displays
  • Line draw function

*NEW* Display a Windows BMP (Arduino version).
This code was added to make it simpler to display a full screen logo bitmap by just copying a 1-bpp Windows BMP into the flash memory and calling 1 function.

If you find this code useful, please consider buying me a cup of coffee

paypal

oled_96's People

Contributors

bitbank2 avatar thehonestmaker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

oled_96's Issues

how to run it

Hi,

I have tried to run it from Ubuntu but I got:
-bash: ./sample: cannot execute binary file: Exec format error

before:
make
make sample
+x to sample
./sample

uname -m
returns: x86_64

file sample
returns: sample: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped

Wrong channel in sample.c (Failed to open i2c bus)

Hey, thanks for sharing your library.
I just cloned it and wanted to give it a try, but I couldn't get it working at frist.

Before I spend any more time, I wanted to compile and test the example, so simply builded and ran it, without looking to closely at the other files. Unfortunately I kept getting "Failed to open i2c bus".

I thought it was a permission issue, but could not resolve it. Only later I saw that oledinit's first parameter is the channel, which is set to 0 in the example, eventhough the comment netxt to it says the call opens the bus on channel 1.

You might want to adjust that line from

i=oledInit(0, 0x3c, 0, 0); // for Raspberry Pi, use channel 1

i=oledInit(1, 0x3c, 0, 0); // for Raspberry Pi, use channel 1

Best regards
Daniel

Installing on OpenWrt(LEDE)

Try to install the latest router OS OpenWrt/LEDE 17.04.1 on a Pi3, gaves me some errors because of the structure of OpenWrt, in makefile and make_sample:
in line 3

CFLAGS=-mfloat-abi=hard -c -Wall -O2

Otherwise I get the error "...uses VFP register arguments" during compile.
line 8 and 9:

sudo cp liboled96.a /usr/lib ;\
sudo cp oled96.h /usr/include

After these changes it works fine. But I have to start the sample executable with the interpreter like

/lib/ld-musl-armhf.so.1 --library-path /lib ./sample

So its not a big issue. Just inform y and others could run into the same.
BTW I would like to thank you for y effort to publish this stuff, it helps me in Pi programming a lot.

Best regards,
Nic

Licensing?

Hello Larry,

I would like to start a derivative project based on this code but I can't find a reference on what license is this code released on. Can you please set a license? I highly recommend MIT but of course you are free to choose.

Thanks.-

How to change display size linux

Hello,

I have tested your library and was trying to see how to change the display size from 128x64 to 128x32. I'be only just received my oled display today and when I ran the sample code only the big text is readable.
The rest is to compressed to read.

Thanks

Font change

Hi,

I would like to change font type to Adafruit_GFX Glyph types.
I have checked your font library. How did you created your font lib?
Do you any idea how can I use gfx fonts?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.