Teensy 3.2 and 128x128 OLED

Status
Not open for further replies.

Mattharnack

New member
Hello,

I'm brand new to the community and this is my first project. It's been a blast leaning and getting this far. I'm working on a project where I have a teensy 3.2 connected to an Adafruit 128x128 OLED. Eventually, I would like to play a motion picture at as many fps as possible. The project is a modified version of the eye of newt concept.

I've been able to run the ssd1351 graphics test successfully, but when I try to load the provided lily128.bmp in the bmp sketch I get an image with many scattered blue pixels throughout the image.

Once I resolve the scattered bmp issue I will need to figure out how to load my own graphics onto the SD card.
I have experimented with a 24bit windows bmp at 128x128 pixels and saved it to the root directory of the SD card, then changed the name in from the lily128.bmp to the new file name, but all I get is a blue screen with I upload the sketch.

Lastly, please point me to any resources that may assist me in creating a sequence of images that I can use to create a looping motion picture on the device.

Thanks for reading my post and any support would would be much appreciated.

https://www.dropbox.com/s/vrb286i5e6t4jyz/IMG_9939.JPG

https://www.dropbox.com/s/3iik74htrkwyn1f/IMG_9940.JPG

Best,
Matt
 
I have used the Adafruit OLED device with the Adafruit uncanny eyes sample program (this basically draws two eyes on two 128x128 screens, and then as fast as possible changes where the eyes point to). Now, uncannyEyes only uses the Adafruit library to initialize the screen, it does its own processing directly.

I have found that I need to drop the SPI bus speed down to 18000000 instead of the default 24000000 in order to the displays not to get garbage. However, I'm not sure initially where to point you to fix it in the Adafruit source. As an experiment, you might try lowering the Teensy clock speed to see if it helps.
 
Hi Michael,

I lowered the clock speed and now the image is displaying properly. Thanks for your help. Now on to getting my own images into the the device and figuring out how to animate a sequence.
 
I'm guessing here, but if you go through the Adafruit driver code, and where ever you see:

Code:
  *csport &= ~ cspinmask;

change it to:

Code:
  *csport &= ~ cspinmask;
  SPISettings settings(18000000, MSBFIRST, SPI_MODE3);		// Slower clock for OLED

and similar change:

Code:
  *csport |= cspinmask;

to

Code:
  *csport |= cspinmask;
  SPI.endTransaction ();

Alternatively, if you are sure you will never, ever put another SPI device on the system, in your code after the begin call to the screen, add:

Code:
  SPISettings settings(18000000, MSBFIRST, SPI_MODE3);		// Slower clock for OLED

This way you don't have to edit the Adafruit driver.
 
Status
Not open for further replies.
Back
Top