Working library for SSD1306

dev
Wed May 17, 2017 5:28 pm
HI,
I searched in the forum and i got many threads on the same topic. which create some confusion in my mind.
Then i took example from STM32 library examples. After compliation i got error. Following are the error.
In file included from C:\Users\ajink\Documents\Arduino\my\oled\oled\oled.ino:1:0:

C:\Users\ajink\Documents\Arduino\hardware\Arduino_STM32-master\STM32F1\libraries\Adafruit_SSD1306/Adafruit_SSD1306_STM32.h:38:26: fatal error: Adafruit_GFX.h: No such file or directory

#include <Adafruit_GFX.h>

^

compilation terminated.

exit status 1
Error compiling for board Generic STM32F103C series.


zmemw16
Wed May 17, 2017 5:36 pm
RTW http://wiki.stm32duino.com/index.php?title=Main_Page
srp

stevestrong
Wed May 17, 2017 5:38 pm
You should download the Adafruit GFX library from here: https://github.com/adafruit/Adafruit-GFX-Library
and extract the zip to the STM32F1/libraries folder.

dev
Wed May 17, 2017 6:11 pm
zmemw16 wrote:RTW http://wiki.stm32duino.com/index.php?title=Main_Page
srp

stevestrong
Wed May 17, 2017 8:12 pm
Search the repo for swap and add the definition to the header file.

dev
Thu May 18, 2017 6:00 pm
But, Is there working library and example?
Because i was trying to correct the error before posting here.

zmemw16
Thu May 18, 2017 9:13 pm
have you configured the 1306 header file for the display type and size ?
srp

dev
Fri May 26, 2017 5:38 pm
yes, i have define LCD type and size of lcd as well in Adafruit_SSD1306_STM32.h

found the solution. Defined
#define swap(a, b) { int16_t t = a; a = b; b = t; }

and it compiled. Soon i will checking on hardware.


dev
Sun May 28, 2017 12:43 pm
I checked on hardware but its not working. I have connected oled to
pb10 scl
pb11 sda

Is it correct?
I am using it as per written in comment in the file header.


dev
Mon May 29, 2017 6:06 pm
When i flashed the code then processor not at all going in loop function.

No Backlight on oled display.

i thinking getting stuck in setup only.


iconic_devices
Tue May 30, 2017 4:33 pm
I got my SSD1306 working with your code. I added the code to Adafruit_SSD1306_STM32.h
and changed the port to I2C1 in Adafruit_SSD1306_STM32.c and its working fine.

Thanks


dev
Tue May 30, 2017 5:02 pm
Thanks.
It is working great with I2C1.

Leave a Reply

Your email address will not be published. Required fields are marked *