SSD1306_128X32_i2c.ino won't compile

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
mgapilot
 
Posts: 2
Joined: Mon Jan 21, 2013 11:18 pm

SSD1306_128X32_i2c.ino won't compile

Post by mgapilot »

Keep getting the same error when compiling this driver. Using a 128X32 i2c OLED display with Arduino Mega 2560 using Arduino 1.0.3
I have redownloaded and tried moving folders. ( I get separate errors when folders are not correct)
Any ideas for a newbee?


#error("Height incorrect, please fix Adafruit_SSD1306.h!");

User avatar
adafruit_support_bill
 
Posts: 88096
Joined: Sat Feb 07, 2009 10:11 am

Re: SSD1306_128X32_i2c.ino won't compile

Post by adafruit_support_bill »

The library supports different display sizes. You need to select which one you are using in Adafruit_SSD1306.h.
For a 128x32 display, comment out the "#define SSD1306_128_64" and un-comment the "#define SSD1306_128_32" as below.

Code: Select all

/*=========================================================================
SSD1306 Displays
-----------------------------------------------------------------------
The driver is used in multiple displays (128x64, 128x32, etc.).
Select the appropriate display below to create an appropriately
sized framebuffer, etc.

SSD1306_128_64 128x64 pixel display

SSD1306_128_32 128x32 pixel display

You also need to set the LCDWIDTH and LCDHEIGHT defines to an
appropriate size

-----------------------------------------------------------------------*/
//   #define SSD1306_128_64
 #define SSD1306_128_32
/*=========================================================================*/

mgapilot
 
Posts: 2
Joined: Mon Jan 21, 2013 11:18 pm

Re: SSD1306_128X32_i2c.ino won't compile

Post by mgapilot »

That did it!
Thank you.

hjojo
 
Posts: 13
Joined: Wed Mar 20, 2013 5:11 pm

Re: SSD1306_128X32_i2c.ino won't compile

Post by hjojo »

Hello,
Sorry for my english, I'm French.
I have the same problem but once I set the correct display is the message on arduino

ssd1306_128x32_spi.cpp:70:2: error: #error ("Height incorrect, please fix Adafruit_SSD1306.h!");
thank you for your answer

Locked
Please be positive and constructive with your questions and comments.

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”