So in this program It actually uses a SSD1306 oled library. But when i change it to the sh1106 library, it shows me this error
C:\Users\sonid\OneDrive\Documents\Arduino\libraries\Adafruit_SH1106-master\Adafruit_SH1106.cpp:29:10: fatal error: avr/pgmspace.h: No such file or directory
#include <avr/pgmspace.h>
^~~~~~~~~~~~~~~~
compilation terminated.
exit status 1
Compilation error: exit status 1
and in this program if we enable bluetooth library and its functions, The bluetooth option appear on the project. but when i did that it showed me other errors
yes, im using ESP32C3 xiao
Seems like that library is AVR specific. Are you up for porting it to ESP32? (not an easy task for anyone who hasn't taken a deep dive into cross-compiling low level embedded applications with GCC, and isn't very familiar with the AVR and ESP32 documentation)
i found a sh1106 library which can make compatable with esp32 chips but still gives me the errors. what should i need to change in the program?
What errors? And what library and what program?
Try changing the angle brackets to quotes
Of course it can't find path <avr/pgmspace.h> if you are compiling for ESP32 (which is not AVR).
#ifdef __AVR__
#include <avr/pgmspace.h>
#elif defined(ESP8266) || defined(ESP32)
#include <pgmspace.h>
#else
#define pgm_read_byte(addr) (*(const unsigned char *)(addr))
#endif
Above are the first lines of Adafruit_SH1106_ESP32.cpp you linked. Have you even read it? You need to define ESP32 in your compiler, then it will include the correct header <pgmspace.h> and not <avr/pgmspace.h>.
So, I should add it to the first lines of the code. Right?