Wiz-IO / platformio-quectel-examples

Examples for PlatformIO Quectel
29 stars 21 forks source link

Arduino/bc66/i2c_oled #2

Closed cskocsis closed 4 years ago

cskocsis commented 4 years ago

Hi Georgi,

While translating (verbose build) I'm getting the following error message. Could you please help with it? I'm not an experienced developer.

C:\Users\cskocsis.platformio\lib\Adafruit SSD1306_ID135\Adafruit_SSD1306.cpp:482:47: error: 'digitalPinToPort' was not declared in this scope dcPort = (PortReg )portOutputRegister(digitalPinToPort(dcPin)); ^~~~ C:\Users\cskocsis.platformio\lib\Adafruit SSD1306_ID135\Adafruit_SSD1306.cpp:482:28: error: 'portOutputRegister' was not declared in this scope dcPort = (PortReg )portOutputRegister(digitalPinToPort(dcPin)); ^~~~~~ C:\Users\cskocsis.platformio\lib\Adafruit SSD1306_ID135\Adafruit_SSD1306.cpp:483:17: error: 'digitalPinToBitMask' was not declared in this scope dcPinMask = digitalPinToBitMask(dcPin); ^~~~~~~ *** [.pio\build\bc66\libb45\Adafruit SSD1306_ID135\Adafruit_SSD1306.cpp.o] Error 1

Wiz-IO commented 4 years ago

Arduino IDE or PlatformIO?

somewhere is defined AVR https://github.com/adafruit/Adafruit_SSD1306/blob/76a2a1fc0015f211670afde51908de1b5aaec95e/Adafruit_SSD1306.h#L43

and this define HAVE_PORTREG

fast workaround: "hack" the Adafruit_SSD1306.h at the begining

undef AVR

cskocsis commented 4 years ago

Thank you so much! It's working now. Although, the image is not correct. IMG-3255 Could you still help in this, please?

Wiz-IO commented 4 years ago

:) level translator

cskocsis commented 4 years ago

Thanks! :)

Wiz-IO commented 4 years ago

or try clear display buffer

Wiz-IO commented 4 years ago

and look your display - there is 5 to 3.3 voltage regulator - bypass it

Wiz-IO commented 4 years ago

and if you use I2C/SPI periphery do not init before sim-ready ( Mediatek bug ) https://github.com/Wiz-IO/platformio-quectel-examples/blob/master/Arduino/bc66/i2c_oled/src/main.cpp#L74

without sim - no problem