Heltec-Aaron-Lee / WiFi_Kit_series

Arduino source codes and toolchain for WiFi_Kit_series made by HelTecAutomation.
GNU Lesser General Public License v2.1
777 stars 309 forks source link

SSD1306 display init error OLED_LoRa_Receiver / OLED_LoRa_Sender #60

Closed JBSchueler closed 5 years ago

JBSchueler commented 6 years ago
OLED_LoRa_Receiver:38: error: no matching function for call to 'SSD1306Wire::SSD1306Wire(int, int, int)'

 SSD1306 display(0x3c, 4, 15);

                            ^

In file included from C:\projects\Arduino\hardware\heltec\esp32\libraries\OLED\src/SSD1306.h:33:0,

                 from C:\projects\Arduino\hardware\heltec\esp32\libraries\LoRa\examples\OLED_LoRa_Receiver\OLED_LoRa_Receiver.ino:23:

C:\projects\Arduino\hardware\heltec\esp32\libraries\OLED\src/SSD1306Wire.h:47:5: note: candidate: SSD1306Wire::SSD1306Wire(uint8_t, uint8_t, uint8_t, uint8_t, OLEDDISPLAY_GEOMETRY)

     SSD1306Wire(uint8_t _address, uint8_t _sda, uint8_t _scl, uint8_t _rst, OLEDDISPLAY_GEOMETRY g = GEOMETRY_128_64) {

     ^

Adding the following lines at the beginning and changing the init of the SD1306 makes it work again

#define SDA    4
#define SCL   15
#define SD1306RST   16 //RST must be set by software
//SSD1306 display(0x3c, 4, 15);
SSD1306  display(0x3c, SDA, SCL, SD1306RST);
JBSchueler commented 6 years ago

Thank you @solotaker to fix this in commit f971dc8c06b24b261bda4c56536126032cd5b4f0

JBSchueler commented 5 years ago

Ticket can be closed