error 'Adafruit_SSD1306' does not name a type

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
rsherwoo
 
Posts: 4
Joined: Mon Sep 30, 2013 11:17 pm

error 'Adafruit_SSD1306' does not name a type

Post by rsherwoo »

This is my error;
'Adafruit_SSD1306' does not name a type

This is the line of code it does not like;
Adafruit_SSD1306 display(OLED_MOSI, OLED_CLK, OLED_DC, OLED_RESET, OLED_CS);

Is this a library error or something? I'm attempting to use the example for the monochrome 128x64 OLED using SPI. This line of code is after the libraries' h files are referenced so I don't know what gives.

Thanks

EternalCore
 
Posts: 239
Joined: Tue Jul 30, 2013 3:57 pm

Re: error 'Adafruit_SSD1306' does not name a type

Post by EternalCore »

You require these Library files: https://github.com/adafruit/Adafruit_SSD1306

Also if you have them and they are installed correctly then post your code so we can see where the error might be.

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

Re: error 'Adafruit_SSD1306' does not name a type

Post by adafruit_support_bill »

This guide explains how and where the library should be installed: http://learn.adafruit.com/adafruit-all- ... nstall-use

rsherwoo
 
Posts: 4
Joined: Mon Sep 30, 2013 11:17 pm

Re: error 'Adafruit_SSD1306' does not name a type

Post by rsherwoo »

Fixed it, thanks. I must have been lucky for a wile now. The cpp and h files cannot be in a sub folder of the one I placed in the libraries folder.

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

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