Back to photostream

DIY: OLED graphic 128x64 display

Using an arduino to drive this.

 

I wrote this calendar code so that it works on a small cpu like the arduino. After looking at the BSD unix 'cal' utility, I decided it was easier to start from scratch than to port that big app over.

 

For $10, its hard to go wrong. The device is 'sort of' i2c; just use the u8glib library:

 

code.google.com/p/u8glib/

 

and for THIS device, you have to set this as the constructor in C++:

 

U8GLIB_SH1106_128X64(U8G_I2C_OPT_NONE);

 

(its an sh1106 device).

 

This is the unit I bought on amazon:

 

www.amazon.com/Huhushop-TM-Serial-Display-Arduino/dp/B00J...

 

The arduino code I wrote takes the month, day and year and uses some open-source date calculation code to find out when the first day of the month is as well as the number of days in that month. Given that, I print, in a for-loop, the days with the right amount of horizontal spacing, until the last day of the month is printed.

 

Note that this is a graphic lcd so you have to be well aware of the (x,y) offsets due to font sizes.

 

This photo does not really do this display justice. The background is very dark (as OLEDs are) and the text is turquoise, not exactly blue.

 

Its size is comparable to a wrist watch (the displayable size). This is a small display, not something you can use for distance viewing, but for on-desk use or on some test equipment where you are sitting close by, its ok.

 

9,766 views
9 faves
4 comments
Uploaded on May 13, 2015
Taken on May 12, 2015