I’m trying to get a SSD1306 oled display to work but it’s i2c not SPI. I’ve found loads of examples for SPI but nothing to show how to get an i2c display to work.
Can anyone give me an example or link to one? I think I’m correct in assuming D0 is SDA and D1 is SCL on my Core board but what do I need to tell the library to use it?
Thanks for the help but I can’t get the example to compile. It gives me the following error,
/usr/local/gcc-arm-embedded/bin/../lib/gcc/arm-none-eabi/5.3.1/../../../../arm-none-eabi/bin/ld: target/workspace.elf section `.data' will not fit in region `APP_FLASH'
/usr/local/gcc-arm-embedded/bin/../lib/gcc/arm-none-eabi/5.3.1/../../../../arm-none-eabi/bin/ld: region `APP_FLASH' overflowed by 184 bytes
collect2: error: ld returned 1 exit status
../build/module.mk:232: recipe for target 'target/workspace.elf' failed
make: *** [target/workspace.elf] Error 1
I tried stripping it down to the absolute basic show a single pixel but still get the same error. I’m using the library Adafruit_SSD1306_RK, not Adafruit_SSD1306, is this the one you mean?
Do you actually have a Spark Core? There probably isn’t enough flash to use a SSD1306 because the fonts need to be stored in flash on the Particle device and space if very limited on the Core. If you have a different type of device, make sure it’s selected (gold star to the left of the name in the Web IDE).
Yes, I actually have a Spark Core and you’re absolutely correct that it is lack of memory!
Thanks for your help, I didn’t realise it had a lot less memory than my Photon.