To begin, the hiccup I'm trying to solve is: I get a Teensy running the program, but absolutely nothing on the OLED.
I suspect that its not using the right i2c lines.
More info:
I just got a 3.6 in hand, and immediately plugged it in, saw a blinking light, and soldered some wires to the 46-47 pins for an i2c display.
It is the 1.3" SPI/I2C (selectable) 128x64 OLED display from Adafruit. I choose I2C because its already set up for I2C, its what I've been using for a long time, and last I checked I2C displays were the cheap ones on Ebay so if I ever need to make a few of something I can do that (the Adafruit ones were quite expensive). This display is both 5v tolerant, but also can run at 3.3v.
After a bit of reading, and not a lot of comprehending, I believe it should be outputting a signal to SCL0 and SDA0 (pins 47 and 48) just fine, and my reset pin should work fine (digital pin 46). I looked at the i2c_t3 library, in this thread, but as far as I can tell unless I heavily modify the Adafruit_SSD1306 library, it wouldn't be my fix, if that is even the problem.
I came across a thready that said something about the teensy needs 4.7kohm resistors in line with the data/clk, so I gave that a try. No change. They are still in place.
Image to show my work. Sorry, 100% white wires, and a bit blurry. I checked all the connections, and they all passed my admittedly hurried inspection with a meter. The forum wants to reject my images and when I use the IMG tags it wants to show it at full resolution (huge), so I am linking it instead.
https://i.imgur.com/CqoGwIV.jpg
I suspect that its not using the right i2c lines.
More info:
I just got a 3.6 in hand, and immediately plugged it in, saw a blinking light, and soldered some wires to the 46-47 pins for an i2c display.
It is the 1.3" SPI/I2C (selectable) 128x64 OLED display from Adafruit. I choose I2C because its already set up for I2C, its what I've been using for a long time, and last I checked I2C displays were the cheap ones on Ebay so if I ever need to make a few of something I can do that (the Adafruit ones were quite expensive). This display is both 5v tolerant, but also can run at 3.3v.
After a bit of reading, and not a lot of comprehending, I believe it should be outputting a signal to SCL0 and SDA0 (pins 47 and 48) just fine, and my reset pin should work fine (digital pin 46). I looked at the i2c_t3 library, in this thread, but as far as I can tell unless I heavily modify the Adafruit_SSD1306 library, it wouldn't be my fix, if that is even the problem.
I came across a thready that said something about the teensy needs 4.7kohm resistors in line with the data/clk, so I gave that a try. No change. They are still in place.
Image to show my work. Sorry, 100% white wires, and a bit blurry. I checked all the connections, and they all passed my admittedly hurried inspection with a meter. The forum wants to reject my images and when I use the IMG tags it wants to show it at full resolution (huge), so I am linking it instead.
https://i.imgur.com/CqoGwIV.jpg
Code:
/*********************************************************************
This is intended for Monocrome OLED from Adafruit based on SSD1306 drivers
128x64, set up to use I2C.
------> http://www.adafruit.com/category/63_98
Using Pin Data Pin #46 as reset, I2C pins 47 (SCL0) and 48 (SDA0), and of course 3.3v + GND.
---
this program for testing purposes:
turns on the built in LED on pin 13
starts serial
initializes the display (and might clear it right away to skip the splash logo built into library)
sets up what the OLED will display and how it will display it
turns off the LED
and displays on the oled
sends a serial message
PINOUT | Teensy Pins | OLED Pins
46 RST
47 CLK
48 DATA
3.3v 3v3
GND GND
*********************************************************************/
/**************************************
Wire 3.5/3.6 I2C_PINS_47_48 47 48
https://forum.pjrc.com/threads/21680-New-I2C-library-for-Teensy3
**************************************/
const int ledPin = 13;
/* *************************************************** */
// OLED DISPLAY:
#include <SPI.h>
#include <Wire.h> //#include <i2c_t3.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define OLED_RESET 46
Adafruit_SSD1306 display(OLED_RESET);
/* *************************************************** */
void setup()
{
pinMode(ledPin, OUTPUT);
digitalWrite(ledPin, HIGH); // set the LED on
Serial.begin(9600);
display.begin(SSD1306_SWITCHCAPVCC, 0x3D); // initialize with the I2C addr 0x3D (for the 128x64)
//display.clearDisplay();
//display.display();
display.setTextSize(1);
display.setTextColor(WHITE);
display.setCursor(0, 0);
display.println("Boot Successful");
digitalWrite(ledPin, LOW); // set the LED off
display.display();
Serial.println("Boot Successful");
}
void loop()
{
}
Last edited: