Installing u8glib

I'm trying to use the u8glib library with my Uno, from Mac OS X. I downloaded it, and as far as I know, I installed it properly. It’s in the libraries directory. It shows up under Sketch -> Include Library, as a Contributed Library.

But the helloWorld sketch buried deep in the u8glib directory does not compile. It says:
HelloWorld.pde:42:20: fatal error: U8glib.h: No such file or directory

I decided to simplify things. I started over and made my own sketch, in the same directory as my others. Here’s my new code:

#include "U8glib.h"
void setup() {
}
void loop() {
}

Here’s my new error:
compileU8glib.ino:2:20: fatal error: U8glib.h: No such file or directory

I also tried changing "U8glib.h" to <U8glib.h>.

If I change preferences to verbose compiling, I get:
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10605 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino -I/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/variants/standard /var/folders/y9/vqnvsvk90m7f8y8g3fk10nq00000gn/T/build8795778503235738330.tmp/compileU8glib.cpp -o /var/folders/y9/vqnvsvk90m7f8y8g3fk10nq00000gn/T/build8795778503235738330.tmp/compileU8glib.cpp.o
compileU8glib.ino:2:20: fatal error: U8glib.h: No such file or directory
compilation terminated.
Error compiling.

For what it’s worth, the directory /var/folders/y9/vqnvsvk90m7f8y8g3fk10nq00000gn/T/build8795778503235738330.tmp/compileU8glib.cpp exists. There’s no compileU8glib.cpp.o, though, and I’m not sure what to do with this info.

Am I not installing the directory properly? I went to gitHub and downloaded the zip file, which automatically uncompressed into a directory called u8glib-master. I removed the “-master” part of the name (because in my limited experience it has always been necessary to remove that) and copied it into the libraries directory and restarted the IDE.

I'm new to the whole arduino world, so I fear I may have missed an obvious point (though I have installed a couple of libraries successfully). Hopefully I'm just forgetting something simple.

Thanks,
bc

Did you restart the IDE?

Aarg,

Yes, I restarted the IDE, and I even restarted the computer, as I'm grasping at straws.

bc

Is this where you downloaded it? GitHub - olikraus/u8glib: Arduino Monochrom Graphics Library for LCDs and OLEDs
Unlike most Arduino libraries, that is not a ready to install version, but must be built first. (And is not just for Arduino.)

You can download an installable library from Service End for Bintray, JCenter, GoCenter, and ChartCenter | JFrog
or you can install it from the Library Manager (Sketch > Include Library > Manage Libraries).

oqibidipo:
Is this where you downloaded it? GitHub - olikraus/u8glib: Arduino Monochrom Graphics Library for LCDs and OLEDs
Unlike most Arduino libraries, that is not a ready to install version, but must be built first. (And is not just for Arduino.)

You can download an installable library from Service End for Bintray, JCenter, GoCenter, and ChartCenter | JFrog
or you can install it from the Library Manager (Sketch > Include Library > Manage Libraries).

Yes, you are correct!
Thank you very much. I didn't realize that some of them needed compiling because the few that I've installed from github came ready to go.

Thanks for your help!
bc

Use the IDE's package manager to install the libs and I have just installed it myself and got it working with those tiny oled displays.
Remember to uncomment the display line that matches you display!

Hi

Official link is this:

But best will be to use the library manager from the latest Arduino IDE.

Oliver

I am having this exact same issue even though I used the library installer in the ide. I still cannot get it to work :frowning:

I am having this exact same issue even though I used the library installer in the ide.

Which you, and OP, have been advised NOT to do. Why do you persist in repeating OP's mistakes, and in ignoring the advice to not do that?

it says to select one among, setup u8g object
i dont which one to select
my oled display has 6pins 128x64
help me out, i'm new to this

How to know, which one to select among "setup u8g object" for oled display in arduino

I suggest to create a new thread for a new problem. Also, please add more information (picture, datasheet, etc).

Oliver

Edit: Also consider to put your request into the "Display" subforum.

olikraus:
I suggest to create a new thread for a new problem. Also, please add more information (picture, datasheet, etc).

Oliver

Edit: Also consider to put your request into the "Display" subforum.

i'm new to this forum of arduino so please cope up with me, sorry!

i have a 6 pin oled display consisting of pins
GND,VCC,
SCL,SDA
RST, D/C

please help me out with a code, i need to badly and no much time left for me.

#include "U8glib.h"

// setup u8g object, please remove comment from one of the following constructor calls
// IMPORTANT NOTE: The following list is incomplete. The complete list of supported
// devices with all constructor calls is here: device · olikraus/u8glib Wiki · GitHub
//U8GLIB_NHD27OLED_BW u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9

in the hello world display it says such comments, could anyone sujjest which one too select among it, i haven't even got my oled to display a light or just a text.

This is a standard SH1106 or SSD1306 128x64 display. There are many Arduino libraries and for sure many tutorials for this display.

Here is at least one tutorial, which covers two libraries:

Oliver

olikraus:
This is a standard SH1106 or SSD1306 128x64 display. There are many Arduino libraries and for sure many tutorials for this display.

Here is at least one tutorial, which covers two libraries:
SSD1306: Easily use this amazing display in any of your projects.

Oliver

but my oled has only 6 pins (i think its a new product), i have found only one video

which doesn't have much info,
i just wanna get my oled to start later part i can do, but i'm unable to get which one to select among the example code too.

True, the CS line is missing on your OLED. Well, just go ahead and don't connect CS. But you may face problems without CS line.

Oliver

it says me to select a setup file for the oled among thoose 100's
could you suggest me which one to select among it

HelloWorld.ino (12.9 KB)

I suggest to use U8g2 and the

U8G2_SSD1306_128X64_NONAME_F_HW_I2C

constructor. Use U8X8_PIN_NONE for the missing CS signal.

Oliver

olikraus:
I suggest to use U8g2 and the

U8G2_SSD1306_128X64_NONAME_F_HW_I2C

constructor. Use U8X8_PIN_NONE for the missing CS signal.

Oliver

i used it, but it says

'U8G2_SSD1306_128X64_NONAME_F_HW_I2C' does not name a type