Hey all,
Im a trying to install OLED 128x64 with SSD1306 on a Particle Electron but i do get compile error.
Here is my setup:
OLED 128x64 and Particle Electron
Pin-out
(OLED) -> (Particle Electron)
GND -> GND
VCC -> 3V3
SCL -> D1
SDA -> D0
Compile error.
lib/Adafruit_SSD1306/src/Adafruit_GFX.cpp:36:0: warning: "pgm_read_byte" redefined [enabled by default]
#define pgm_read_byte(addr) (*(const unsigned char *)(addr))
^
In file included from ../wiring/inc/spark_wiring.h:37:0,
from ./inc/application.h:36,
from lib/Adafruit_SSD1306/src/Adafruit_GFX.h:4,
from lib/Adafruit_SSD1306/src/Adafruit_GFX.cpp:34:
../wiring/inc/spark_wiring_arduino.h:32:0: note: this is the location of the previous definition
#define pgm_read_byte(x) (*(x))
^
../../../build/target/wiring/platform-10-m//libwiring.a(spark_wiring_random.o): In function `randomSeed(unsigned int)':
/spark/compile_service/shared/workspace/10_electron_0.6.0_102_1/firmware/wiring/src/spark_wiring_random.cpp:5: multiple definition of `random(int)'
../../../build/target/user/platform-10/libuser.a(ssd1306_128x64_i2c.o):/src/ssd1306_128x64_i2c.cpp:30: first defined here
collect2: error: ld returned 1 exit status
make: *** [d5d750bc7ce445a4a4e2fc428880759167a14435d1599cd694248d45dcdd.elf] Error 1
Error: Could not compile. Please review your code.
I do just use the sample ssd1306-128x64-i2c.ino with no changes only I2C addr 0x3C (for the 128x64)
When i do try the OLED sample surfsoon-oled and again only change the I2C addr to 0x3C
Now the OLED do sign Adafruit logo and no more -it looks like it works or?
sample surfsoon-oled - Code change:
Line 18: oled.begin(SSD1306_SWITCHCAPVCC, 0x3C); // initialize with the I2C addr 0x3D (for the 128x64)
But what can i do to fix the error
Thanks
BG
Meg