Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 2 of 2

Thread: OLED display 128x64 ADA-938 SPI on Teensy4.0 does not work

  1. #1
    Senior Member
    Join Date
    Feb 2019

    OLED display 128x64 ADA-938 SPI on Teensy4.0 does not work

    I dont get the ADA-938 OLED display to work with the Teensy4.0. If I use the from I get a lot of compiler errors. If I use the newest adafruit ssd1306 library the file compiles fine, but the display does not show any reactions.

    Does anyone have experiences with SSD1306 displays on the Teensy 4.0?

  2. #2
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Yes, just powered up and tested an SSD1306 to work work in recent days. And again now on another T_4.0:
    Using library SPI at version 1.0 in folder: T:\arduino_1.8.10\hardware\teensy\avr\libraries\SPI 
    Using library Wire at version 1.0 in folder: T:\arduino_1.8.10\hardware\teensy\avr\libraries\Wire 
    Using library Adafruit_GFX at version 1.5.6 in folder: T:\arduino_1.8.10\hardware\teensy\avr\libraries\Adafruit_GFX 
    Using library Adafruit_SSD1306 at version 1.3.0 in folder: T:\tCode\libraries\Adafruit_SSD1306
    This is on IDE 1.8.10 and TeensyDuino 1.49 Beta 4, all libraries as indicated come from TeensyDuino install except the "(sketchbook)\libraries\Adafruit_SSD1306" is a local copy of the last I got from Adafruit dated here 9/19/19 as that library is not included in TeensyDuino.

    The sketch here was edited but moving to this sketch :: ...\libraries\Adafruit_SSD1306\examples\ssd1306_12 8x64_i2c\ssd1306_128x64_i2c.ino

    Requires this change to run where address must be 0x3C not 0x3D: if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) { // Address 0x3D for 128x64

    Since there is no reset pin this change can also be made to that example where ", OLED_RESET" is removed:
    //Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
    Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire);
    For fun adding this makes it run faster - and the 'a*10' can be just 'a': #define delay(a) delayMicroseconds( a*10 )

    Also indicated in the console output this line needs activated in :: ...\libraries\Adafruit_SSD1306\Adafruit_SSD1306.h:
    // ONE of the following three lines must be #defined:
    #define SSD1306_128_64 ///< DEPRECTAED: old way to specify 128x64 screen
    Last edited by defragster; 12-31-2019 at 10:21 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts