Actually, I’m trying to operate my OLED, with “avr c”, but i’m learning avr-c. moreover, I haven’t had idea of using “setCursor” function in avr-c and it is also not available in platform IO. Do I need to install any library to use setCursor function to platform IO?? or how to do this in avr-c…
SetCursor and other functions, are not part of the Arduino Language. They will be in a library that you need to include in your sketch.
In AVR C++, you don’t get that library unless someone wrote one for you, or you spent ages reading the OLED Data sheet and wrote one yourself.
PlatformIO lets you use the Arduino framework and thus, libraries, or, no framework and no (Arduino) libraries.
If you go to https://PlatformIO.org/lib you can search for a suitable library to replace the Arduino one for your OLED. There will then be some function similar to SetCursor etc. (Hopefully!) Make sure it’s a library for the Atmelavr platform though.
Thanks @NormanDunbar, Yes, I Think, I should follow your way.
You are welcome!
By the way, here’s a search I did for OLED and the atmelavr platform: https://platformio.org/lib/search?query=platform:atmelavr%20oled.
One of the libraries there is the U8glib by Oliver Kraus, https://platformio.org/lib/show/7/U8glib, that one covers a lot of OLED display types – I use it for my SH1106 OLED displays. It might be useful for yours? The library states that it covers quite a lot of devices, but the definitive list is at https://github.com/olikraus/u8glib/wiki/device. Please note, this library will not be improved any more and this one is advised to be used instead: https://platformio.org/lib/show/942/U8g2. Details about this library are at https://github.com/olikraus/u8g2/wiki.