Character only library for OLED display

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Character only library for OLED display

Postby fat16lib » Wed Feb 29, 2012 3:15 pm

I wrote a character only library for the Monochrome 128x32 OLED graphic display. It should also work on the 128x64 display but I have not tested it since I don't have this display.

This library is not buffered so it uses about 500 bytes less RAM than the Adafruit graphic library.

This neat tiny display can used in place of a standard LCD in projects that are short of RAM by using this library.

The file is SSD1306ASCII20120229.zip at http://code.google.com/p/beta-lib/downloads/list.

Here is the readme file:
SSD1306ASCII is an unbuffered character only library for an Adafruit 1306
OLED display. The SSD1306ASCII library only requires a few bytes of RAM.

SSD1306ASCII implements a small part of the LiquidCrystal API. Implemented
functions include clear(), home(), print(), setCursor(), and write().

It has only been tested with the "Monochrome 128x32 OLED graphic display".

http://www.adafruit.com/products/661

To use this library, copy the SSD1306ASCII folder to your libraries folder.

Edit SSD1306ASCII.h and select your display type. The default is:

// #define SSD1306_128_64
#define SSD1306_128_32

Select the font that will be used by defining FONT_TYPE. The default is:

#define FONT_TYPE 1

This is an 96 character version of the Adafruit glcdfont.

See SSD1306fonts.pdf for a rough representation of other choices.

Try the ssd1306HelloWorld example first.

The ssd1306ShowFont example displays all characters in the font.

The ssd1306FontMap example was used to generate SSD1306fonts.pdf.
fat16lib
 
Posts: 586
Joined: Wed Dec 24, 2008 12:54 pm

Re: Character only library for OLED display

Postby Desert_Rat » Fri Apr 13, 2012 4:34 pm

Thank you! Since my little project doesn't require graphics, only text I easily replaced the Adafruit library with this one and not only did it give me a little more RAM, it reduced the program code itself about 2k as well.
This is great for those that don't require fancy graphic capabilities and only use text.
---------------------------------------------------------------------------------
I went from living in a van down by the river to a shack in the desert.
Meh, at least it's an upgrade.
User avatar
Desert_Rat
 
Posts: 5
Joined: Sun Mar 18, 2012 4:04 am

Re: Character only library for OLED display

Postby zulucat » Tue Apr 17, 2012 1:40 am

fat16lib wrote: ... It should also work on the 128x64 display but I have not tested it since I don't have this display ...


I did some quick testing with my 128x64 display. Both HelloWorld and ShowFont examples work with the bigger display.
zulucat
 
Posts: 21
Joined: Wed Nov 16, 2011 11:43 pm
Location: Southern SoCal

Re: Character only library for OLED display

Postby davegior » Sat May 05, 2012 7:05 pm

Fantastic. Much easier to use than the sample librarary. Thank you for sharing it with us.
Question: is there a character for Omega? Ω
davegior
 
Posts: 9
Joined: Mon Apr 30, 2012 10:56 am
Location: NYC

Re: Character only library for OLED display

Postby buton » Wed Feb 27, 2013 9:19 am

just what i was looking for...

thanks
buton
 
Posts: 52
Joined: Fri May 11, 2012 7:06 am


Return to Glowy things (LCD, LED, TFT, EL) purchased at Adafruit

Who is online

Users browsing this forum: paulstoffregen and 6 guests

Stuff to buy from the Adafruit store and links to product documentation!


New Products [114]

Raspberry Pi[82]
 
FLORA[24]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[12]
Arduino[60]
 
NETduino[14]
 
BeagleBone[23]
 
Android[6]
 
XBee[10]
More Dev Boards[30]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[39]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[9]


 
Breakout Boards[35]
LCDs & Displays[49]
Components & Parts[70]
Batteries & Power[54]
EL Wire/Tape/Panel[52]
LEDs[112]
 
Wireless[16]
Cables[66]
 
Lasers[6]
Sensors/Parts[147]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[70]
 
iDevices[13]
Tools[71]
 
Wearables[41]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[25]


 
Stickers[41]
 
Skill badges[55]
 
Books[26]
 
Circuit Playground[7]
 
Gift Certificates[4]