Author Topic: Adafruit_SSD1306  (Read 9343 times)

makerbotspace

  • Newbie
  • *
  • Posts: 5
Adafruit_SSD1306
« on: June 24, 2013, 12:23:08 pm »
I have a I2C OLED Display from Adafruit:
http://www.adafruit.com/products/931
It uses the following Libraries\
https://github.com/adafruit/Adafruit_SSD1306
https://github.com/adafruit/Adafruit-GFX-Library
When I compile i get this error -
 ssd1306_128x32_i2c.ino:53:2: error: #error ("Height incorrect, please fix Adafruit_SSD1306.h!");In file included from ssd1306_128x32_i2c.ino:19:C:\Users\Mario\Desktop\MS2\DigisparkArduino-Win32-1.0.4-May19\DigisparkArduino-Win32\Digispark-Arduino-1.0.4\libraries\Arduino_Wire/Wire.h:61: error: conflicting return type specified for 'virtual size_t TwoWire::write(const uint8_t*, size_t)'C:\Users\Mario\Desktop\MS2\DigisparkArduino-Win32-1.0.4-May19\DigisparkArduino-Win32\Digispark-Arduino-1.0.4\hardware\digispark\cores\tiny/Print.h:75: error:   overriding 'virtual void Print::write(const uint8_t*, size_t)'
Help please?
 
Thank you
Brandon
 
 
 
 
 
 
 

makerbotspace

  • Newbie
  • *
  • Posts: 5
Re: Adafruit_SSD1306
« Reply #1 on: June 28, 2013, 08:28:47 am »
Post
I'm reposting here so anyone dealing with this can follow the resolution:
by adafruit_support_mike » 28 Jun 2013 04:32
 It looks like you need to go into the file Adafruit_SSD1306.h and move a couple of comment markers:

  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
/*=========================================================================*/

The existing file is configured for a 128 x 64 display, and it looks like you're trying to use a 128 x 32 display. When you void a product warrany, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.  User avatar
adafruit_support_mike  Posts: 1839 Joined: 11 Feb 2010 18:51

makerbotspace

  • Newbie
  • *
  • Posts: 5
Re: Adafruit_SSD1306
« Reply #2 on: June 28, 2013, 08:30:07 am »
Re: Adafruit_SSD1306 Postby makerbotspace » 28 Jun 2013 15:31
 Your Awesome :)

Making headway -

I have seen this in other posts for the Digispark. I'm now getting this:

In file included from ssd1306_128x32_i2c.ino:19:
C:\Users\Mario\Desktop\MS2\DigisparkArduino-Win32-1.0.4-May19\DigisparkArduino-Win32\Digispark-Arduino-1.0.4\libraries\Arduino_Wire/Wire.h:61: error: conflicting return type specified for 'virtual size_t TwoWire::write(const uint8_t*, size_t)'
C:\Users\Mario\Desktop\MS2\DigisparkArduino-Win32-1.0.4-May19\DigisparkArduino-Win32\Digispark-Arduino-1.0.4\hardware\digispark\cores\tiny/Print.h:75: error: overriding 'virtual void Print::write(const uint8_t*, size_t)'  makerbotspace  Posts: 2 Joined: 02 Nov 2010 16:28 

dougal

  • Sr. Member
  • ****
  • Posts: 289
Re: Adafruit_SSD1306
« Reply #3 on: June 28, 2013, 09:12:29 am »
Do you need to modify it to use TinyWire instead of the regular Wire library?


http://digistump.com/board/index.php/topic,939.msg3365.html#msg3365