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:
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.
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.
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!
// 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.
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.