Teensy 3.2 and 1106 u8glib OLED liberary

hello guys,
i read all post and still cant find any answare , please help if anyone can.
i need to use I2C OLED 1106 with teensy 3.2 by u8glib liberary but its now working,
any solotion?
 
Can you post your code that is NOT working along with details of your setup.
See FORUM RULE at the top of the page.
 
Can you post your code that is NOT working along with details of your setup.
See FORUM RULE at the top of the page.

its simple, the code and liberary work fine with arduino nano,uno,mega 2560, but its not working with teensy 3.2 the oled dont become on, i connect it with i2c portocol
 
...also show your connections.

Have you used I2C pull-up resistors? Not using pull-up resistors is a common I2C error when moving to Teensy.

no, but i can see the i2c address of oled by this prog isnt it enugh?
do i still need pull up resistors?

#include <Wire.h>

// -------------------------------------------------------------
// SET~UP SET~UP SET~UP SET~UP SET~UP SET~UP
// -------------------------------------------------------------
void setup()
{
Wire.begin();
Serial.begin(9600);
Serial.println("--------------------------");
Serial.println("I2C Hex hexAddress Scanner");
Serial.println("--------------------------");
}

// -------------------------------------------------------------
// LOOP LOOP LOOP LOOP LOOP LOOP LOOP LOOP LOOP
// -------------------------------------------------------------
void loop()
{
byte response, hexAddress;
int deviceCnt = 0;

Serial.println("Scanning...");
for (hexAddress = 1; hexAddress < 127; hexAddress++ )
{
// Start transmitting on every known hex hexAddress
Wire.beginTransmission(hexAddress);

// See if something acknowledged the transmission
response = Wire.endTransmission();
if (response == 0)
{
Serial.print("I2C device found at hexAddress 0x");
if (hexAddress < 16)
Serial.print("0");
Serial.println(hexAddress, HEX);
deviceCnt++;
}
else if (response == 4) // unknown error
{
Serial.print("Unknown response at hexAddress 0x");
if (hexAddress < 16)
Serial.print("0");
Serial.println(hexAddress, HEX);
}
}

// Nothing found at any of the hexAddresses, boo
if (deviceCnt == 0)
Serial.println("No I2C devices found\n");
else
Serial.println("Scan completed.\n");

// Delay 5 seconds and repeat scan
delay(5000);
}
 
Perhaps there is an issue with the u8g2 library running on a Teensy?
You could try to run an example from the Adafruit SH1106 library.
But like BriComp says: please share your code and connections for us to check.
For example, what exact 1.3" SH1106 OLED display are you using? The 128x64px or the 128x32px version? Details do matter...

Paul
 
Perhaps there is an issue with the u8g2 library running on a Teensy?
You could try to run an example from the Adafruit SH1106 library.
But like BriComp says: please share your code and connections for us to check.
For example, what exact 1.3" SH1106 OLED display are you using? The 128x64px or the 128x32px version? Details do matter...

Paul

Adafruit? You mean clear the problem by using other liberary?! Thats not fair😕
 
But like BriComp says: please share your code and connections for us to check.
For example, what exact 1.3" SH1106 OLED display are you using? The 128x64px or the 128x32px version? Details do matter...
please share your code and connections for us to check.
 
its simple, the code and liberary work fine with arduino nano,uno,mega 2560, but its not working with teensy 3.2 the oled dont become on, i connect it with i2c portocol

As mentioned, it is often times hard to help, if we do not see what code you are trying to run. Likewise, on how the display is hooked up to the teensy. Which display is it? Do you have a link to it?
For example is there a backlight pin? If so how is it connected? Power pin, what is it hooked up to? 5v or 3.3v?

Sometimes the issue is 5v of Arduinos like UNO versus 3.3v of T3.2. Sometimes it is the library you are using. Does it support the Teensy? Which version are you running?

Again it often helps if you post a picture of the setup that shows the wiring. It sometimes helps to find things like bad solder joints, or no solder joints. For example, some have tried to simply
push pins into a breadboard and have the teensy not soldered to them, which typically won't work.

Showing the code also helps eliminate things like: are you using the right define? Probably one of these.
//U8GLIB_SH1106_128X64 u8g(U8G_I2C_OPT_NONE); // I2C / TWI
//U8GLIB_SH1106_128X64 u8g(U8G_I2C_OPT_DEV_0|U8G_I2C_OPT_FAST); // Dev 0, Fast I2C / TWI
//U8GLIB_SH1106_128X64 u8g(U8G_I2C_OPT_NO_ACK); // Display which does not send ACK

Again just throwing darts!
 
Back
Top