Hi!
I'm pretty new to Arduino building and I'm facing some trouble getting an OLED display working with my Arduino Uno WiFi Rev2.
Display specs: Grove OLED Display 1.12", 128x128, SH1107G driver IC, Interface I2C, Supply voltage 3.3/5V
I have tried both Grove's own driver and U8g2 drivers and their "Hello World" examples but neither of them work. The code compiles, but they both give the same error message:
avrdude: Short read, read only 0 out of 64 bytes
avrdude: jtag3_edbg_recv(): Unexpected response 0x12
avrdude: retrying with external reset applied
avrdude: jtag3_edbg_send(): Unexpected response 0x81, 0x11
avrdude: jtag3_edbg_recv(): Unexpected response 0x80
avrdude: retrying with external reset applied
avrdude: JTAGEN fuse disabled?
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
avrdude: jtag3_edbg_send(): Unexpected response 0x81, 0x11
avrdude: jtag3_edbg_recv(): Unexpected response 0x80
avrdude: jtag3_edbg_send(): Unexpected response 0x81, 0x11
avrdude: jtag3_edbg_recv(): Unexpected response 0x80
avrdude: jtag3_edbg_signoff(): unexpected response 0x81, 0x11
avrdude: jtag3_edbg_signoff(): unexpected response 0x01, 0x00
An error occurred while uploading the sketch
For the U8g2 example I have used the controller line:
U8X8_SH1107_SEEED_128X128_SW_I2C u8x8(/* clock=/ SCL, / data=/ SDA, / reset=*/ U8X8_PIN_NONE);
The display has a Grove wire attachment and it has 4 pins:
BLACK: GDN
RED: VCC
WHITE: SDA
YELLOW: SCL
The connections to my Arduino are as follows:
black to GND, red to 5V (have tried 3.3V also), white to SDA and yellow to SCL. For the SDA and SCL I have also tried using A4 and A5.
The display starts heating up as soon as i plug the power to my Arduino via USB, which makes me think is the display shorted or something?
The Arduino works fine on other projects and sensors so atleast it is not broken.
Here Are the example codes that I used:
Grove's own example:
#include <Wire.h>
#include <SeeedGrayOLED.h>
#include <avr/pgmspace.h>
void setup()
{
Wire.begin();
SeeedGrayOled.init(SH1107G); //initialize SEEED OLED display
SeeedGrayOled.clearDisplay(); //Clear Display.
SeeedGrayOled.setNormalDisplay(); //Set Normal Display Mode
SeeedGrayOled.setVerticalMode(); // Set to vertical mode for displaying text
for(char i=0; i < 16 ; i++)
{
SeeedGrayOled.setTextXY(i,0); //set Cursor to ith line, 0th column
SeeedGrayOled.setGrayLevel(i); //Set Grayscale level. Any number between 0 - 15.
SeeedGrayOled.putString("Hello World OLED"); //Print Hello World
}
}
void loop()
{
}
U8g2 example:
#include <Arduino.h>
#include <U8x8lib.h>
#ifdef U8X8_HAVE_HW_SPI
#include <SPI.h>
#endif
//U8X8_SH1107_SEEED_128X128_SW_I2C u8x8(/* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE);
//U8X8_SH1107_SEEED_128X128_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE);
void setup(void)
{
/* U8g2 Project: SSD1306 Test Board */
//pinMode(10, OUTPUT);
//pinMode(9, OUTPUT);
//digitalWrite(10, 0);
//digitalWrite(9, 0);
/* U8g2 Project: KS0108 Test Board */
//pinMode(16, OUTPUT);
//digitalWrite(16, 0);
u8x8.begin();
u8x8.setPowerSave(0);
}
void loop(void)
{
u8x8.setFont(u8x8_font_chroma48medium8_r);
u8x8.drawString(0,0,"Hello World!");
u8x8.refreshDisplay(); // only required for SSD1606/7
delay(2000);
}
Thanks in advance for any help You can provide!