OLED 128x32 i2C not working

I recently received OLED 128x32 i2C SSD1306, connected it and it isnt working with code i found.

Then i figured out it may be the code, tryed te second one same thing, figured out each OLED has its own address so i ran a i2C Scanner from Arduino playground ti find it stuck on "Scanning..."

Everything is wired correct, code is running on correct port, and selected in exaples the right 128x32 i2c code.

Also for some reason i got SCK instead of SCL like many other i saw people use.

Any ideas on how do get it unstuck from only "Scanning..." and get the address and then get it to work?


Can you verify you are getting voltage out of the VCC pin? The soldering does not look good on a few of the pins.

Yes, the LED is working, so GND and VCC should be working.

And you of course you have a series resistor for your LED ?

As stated :face_with_hand_over_mouth:

I didn't get what you said, i don't understand you + im not realy good at electronics.

Did you say i need to add a resistor to the LED or resistor to VCC?

Either wire your LED as D5 or D6 in the attached schematic, you decide.

Try using this code -

#include <Arduino.h>
#include <U8g2lib.h>
#include <SPI.h>
#include <Wire.h>

U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C u8g2(U8G2_R0); 

 void setup(void) {
   u8g2.begin();
}

  void loop(void) {
   u8g2.clearBuffer();					// clear the internal memory
   u8g2.setFont(u8g2_font_logisoso28_tr);  // choose a suitable font at https://github.com/olikraus/u8g2/wiki/fntlistall
   u8g2.drawStr(8,29,"MYBOTIC");	// write something to the internal memory
   u8g2.sendBuffer();					// transfer internal memory to the display
   delay(3000);

   u8g2.clearBuffer();         // clear the internal memory
   u8g2.setFont(u8g2_font_logisoso28_tr);  // choose a suitable font at https://github.com/olikraus/u8g2/wiki/fntlistall
   u8g2.drawStr(31,24,"your");  // write something to the internal memory
   u8g2.sendBuffer();         // transfer internal memory to the display
   delay(800);

   u8g2.clearBuffer();         // clear the internal memory
   u8g2.setFont(u8g2_font_logisoso28_tr);  // choose a suitable font at https://github.com/olikraus/u8g2/wiki/fntlistall
   u8g2.drawStr(10,29,"robotic");  // write something to the internal memory
   u8g2.sendBuffer();         // transfer internal memory to the display
   delay(800);

   u8g2.clearBuffer();         // clear the internal memory
   u8g2.setFont(u8g2_font_logisoso28_tr);  // choose a suitable font at https://github.com/olikraus/u8g2/wiki/fntlistall
   u8g2.drawStr(4,29,"solution");  // write something to the internal memory
   u8g2.sendBuffer();         // transfer internal memory to the display
   delay(2000);

   
}

or try using this library - GitHub - adafruit/Adafruit_SSD1306: Arduino library for SSD1306 monochrome 128x64 and 128x32 OLEDs

I2C modules to be connected to A4 (SDA) and A5 (SCL) as i see you are connecting to D2 and D3 which is wrong. Don't connect LED directly to Arduino ports, this will destroy the IC port over the time.

The OP is using a Pro Micro, which has an atmega32u4. D2 is SDA, D3 is SCL on that chip.

sorry i thought it was Pro Mini. pl ignore my suggestions.

This topic is a continuation of Timer that shows how long have me and my gf been together - #46 by sweet42

Please continue there