0

Replace OLED from adafruit sample project
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Replace OLED from adafruit sample project

by richardtam on Tue Aug 28, 2018 10:24 pm

Hi All, I am interested in making the Eye of Newt (https://learn.adafruit.com/eye-of-newt). But I want to make it as small as possible. According to the tutorial, it uses OLED Breakout Board - 16-bit Color 1.5" (https://www.adafruit.com/product/1431) in the design.

Is it possible to change from 1.5" OLED to OLED Breakout Board - 16-bit Color 0.96" (https://www.adafruit.com/product/684)??

Any input are welcome! Thank you very much!

richardtam
 
Posts: 3
Joined: Mon Jul 30, 2018 2:57 pm

Re: Replace OLED from adafruit sample project

by oesterle on Wed Aug 29, 2018 7:40 pm

Hi, Richard!

Yes, you can adapt the project to use the OLED Breakout Board - 16-bit Color 0.96" w/microSD holder.

You'll need to change the project code to use the SSD1331 library (vs the original's SSD1351). That's probably just 2 or 3 lines of code. See the tutorial for getting that display up and running.

Note that the 0.96" screen is 96x64 pixels, vs the original's 128x128 pixels. Therefore, the eye graphics may stretch beyond the screen boundaries. If you are alright with this, you may be able to adjust the code to draw the graphics at an offset of -16, -32, to center the eyes in the much smaller display. It's worth a try.

If that doesn't work well enough visually, you could make new, scaled-down versions the current set of eyes in Uncanny_Eyes-master, using the convert/tablegen.py conversion tool provided.

Be sure also to take into account that the 0.96" display is rectangular, vs the square aspect ratio of the original.

Cheers,

Eric

oesterle
 
Posts: 291
Joined: Tue Sep 17, 2013 11:32 pm

Re: Replace OLED from adafruit sample project

by richardtam on Wed Aug 29, 2018 9:53 pm

Hi Eric,

Thanks for such a helpful reply!! I shall try to make it when the board is in hand.
Get back to you when I made some progress in it!
Thank you so much! :)

Richard

richardtam
 
Posts: 3
Joined: Mon Jul 30, 2018 2:57 pm

Re: Replace OLED from adafruit sample project

by richardtam on Tue Sep 18, 2018 12:12 pm

Finally, I get it done!!!
I spent much time on the GFX library, SPI protocol, python script and the sample code.
I tried many times to modify the code, adjust the sample images, python script and the library.
It works pretty well! I am very happy with it! :)
Thanks for tutorials and open source code!
Attachments
IMG_4076s.jpg
Electronic Animated Eyes in 0.96" OLED screen (96x64 pixels
IMG_4076s.jpg (72.62 KiB) Viewed 33 times

richardtam
 
Posts: 3
Joined: Mon Jul 30, 2018 2:57 pm

Please be positive and constructive with your questions and comments.