HelTecAutomation / HeltecDocs

Heltec Automation products relevant documents.
19 stars 27 forks source link

Example program for GPS has an error #14

Open SamGJay opened 2 years ago

SamGJay commented 2 years ago

I think that line 8 for the example program "oledDisplayGPSInfo" for HTCC-AB02S CubeCell Lora-GPS board should be updated.

Currently it is:

SSD1306Wire  display(0x3c, 500000, I2C_NUM_0, GEOMETRY_128_64, GPIO10 ); // addr , freq , i2c group , resolution , rst

But this results in error from Arduino IDE 1.8.19: "no matching function for call to 'SSD1306Wire::SSD1306Wire(int, int, int, DISPLAY_GEOMETRY, PinNames)'

The program seems to work when this I2C_NUM_0 updated to SDA, SCL as below:

SSD1306Wire  display(0x3c, 500000, SDA, SCL, GEOMETRY_128_64, GPIO10 ); // addr , freq , i2c group , resolution , rst
alexandredubois commented 2 years ago

I noticed the same problem with my cubecell AB02S board and i can confirm the solution provided by @SamGJay works very well