错误信息:
Arduino:1.8.4 (Windows 7), 开发板:"Arduino/Genuino Uno"
C:\Program Files\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files\Arduino\hardware -hardware C:\Users\Administrator\AppData\Local\Arduino15\packages -tools C:\Program Files\Arduino\tools-builder -tools C:\Program Files\Arduino\hardware\tools\avr -tools C:\Users\Administrator\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files\Arduino\libraries -libraries C:\Users\Administrator\Documents\Arduino\libraries -fqbn=arduino:avr:uno -ide-version=10804 -build-path C:\Users\ADMINI~1\AppData\Local\Temp\arduino_build_758686 -warnings=all -build-cache C:\Users\ADMINI~1\AppData\Local\Temp\arduino_cache_867828 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Users\Administrator\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2 -prefs=runtime.tools.arduinoOTA.path=C:\Users\Administrator\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.1.1 -prefs=runtime.tools.avrdude.path=C:\Users\Administrator\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9 -verbose C:\Users\Administrator\Downloads\Periodic_table_of_elements\Periodic_table_of_elements.ino
C:\Program Files\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files\Arduino\hardware -hardware C:\Users\Administrator\AppData\Local\Arduino15\packages -tools C:\Program Files\Arduino\tools-builder -tools C:\Program Files\Arduino\hardware\tools\avr -tools C:\Users\Administrator\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files\Arduino\libraries -libraries C:\Users\Administrator\Documents\Arduino\libraries -fqbn=arduino:avr:uno -ide-version=10804 -build-path C:\Users\ADMINI~1\AppData\Local\Temp\arduino_build_758686 -warnings=all -build-cache C:\Users\ADMINI~1\AppData\Local\Temp\arduino_cache_867828 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Users\Administrator\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2 -prefs=runtime.tools.arduinoOTA.path=C:\Users\Administrator\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.1.1 -prefs=runtime.tools.avrdude.path=C:\Users\Administrator\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9 -verbose C:\Users\Administrator\Downloads\Periodic_table_of_elements\Periodic_table_of_elements.ino
Using board 'uno' from platform in folder: C:\Users\Administrator\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.21
Using core 'arduino' from platform in folder: C:\Users\Administrator\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.21
Detecting libraries used...
"C:\Users\Administrator\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.21\cores\arduino" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.21\variants\standard" "C:\Users\ADMINI~1\AppData\Local\Temp\arduino_build_758686\sketch\Periodic_table_of_elements.ino.cpp" -o "nul"
"C:\Users\Administrator\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.21\cores\arduino" "-IC:\Users\Administrator\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.21\variants\standard" "C:\Users\ADMINI~1\AppData\Local\Temp\arduino_build_758686\sketch\Periodic_table_of_elements.ino.cpp" -o "C:\Users\ADMINI~1\AppData\Local\Temp\arduino_build_758686\preproc\ctags_target_for_gcc_minus_e.cpp"
C:\Users\Administrator\Downloads\Periodic_table_of_elements\Periodic_table_of_elements.ino:1:40: fatal error: U8glib.h: No such file or directory
#include "U8glib.h"//寮曠敤U8G澶存枃浠?
^
compilation terminated.
exit status 1
为开发板 Arduino/Genuino Uno 编译时出错。
代码:
#include "U8glib.h"//引用U8G头文件
U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE);//设置设备名称:I2C-SSD1306-128*64(OLED)
//如果屏幕不同请自行修改 如果第一次使用u8glib并且遇到显示不正确,请自行修改u8g配置
/*=========================================================
位图
=========================================================*/
//HWT
const uint8_t HWT[] PROGMEM = {0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x06, 0x33, 0x3c, 0x12, 0x8b, 0xe0, 0x89, 0x44, 0x42, 0x09, 0x49, 0x24, 0x12, 0x88, 0x80, 0x89, 0x44, 0x99, 0x02, 0x49, 0x3c, 0x1e, 0x88, 0x8c, 0x8f, 0x44, 0x99, 0x04, 0x49, 0x24, 0x12, 0xa8, 0x8c, 0x89, 0x54, 0x42, 0x08, 0x49, 0x24, 0x12, 0x50, 0x80, 0x89, 0x28, 0x66, 0x0f, 0x33, 0xbc, 0x12, 0x50, 0x80, 0xe9, 0x28, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
//title
const uint8_t title[] PROGMEM = {0x00, 0x00, 0x00, 0x08, 0x00, 0x3f, 0xff, 0x02, 0x30, 0x00, 0x00, 0x80, 0x00, 0x3f, 0xfc, 0x03, 0xff, 0xf0, 0x3f, 0xff, 0x02, 0x33, 0xf8, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x30, 0x83, 0x0f, 0xfb, 0x18, 0x7f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x30, 0x83, 0x07, 0x33, 0x18, 0x00, 0x80, 0x00, 0x00, 0x00, 0x03, 0xff, 0xe0, 0x37, 0xf3, 0x02, 0x33, 0x18, 0x3f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x30, 0x83, 0x03, 0xf3, 0xf8, 0x3f, 0xfe, 0x00, 0x7f, 0xff, 0x0f, 0xff, 0xf8, 0x21, 0xc3, 0x02, 0x33, 0x18, 0x00, 0x80, 0x00, 0x06, 0x20, 0x00, 0x31, 0x80, 0x2f, 0xfb, 0x03, 0x33, 0x18, 0xff, 0xff, 0x80, 0x06, 0x20, 0x01, 0xff, 0x80, 0x20, 0x03, 0x03, 0xf3, 0x18, 0x03, 0x40, 0x00, 0x06, 0x20, 0x01, 0xfe, 0x40, 0x27, 0xf3, 0x02, 0x33, 0xf8, 0x06, 0xc2, 0x00, 0x06, 0x20, 0x00, 0x38, 0x60, 0x26, 0x33, 0x0f, 0xfb, 0x18, 0x0e, 0x46, 0x00, 0x04, 0x20, 0x03, 0xff, 0xf0, 0x66, 0x33, 0x0f, 0xfb, 0x18, 0x3e, 0x7c, 0x00, 0x0c, 0x20, 0x03, 0x0c, 0x00, 0x66, 0x33, 0x02, 0x23, 0x18, 0x76, 0x38, 0x00, 0x18, 0x21, 0x80, 0xcc, 0xc0, 0x67, 0xf3, 0x06, 0x36, 0x