Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arduino/bc66/i2c_oled #2

Closed
cskocsis opened this issue Sep 8, 2019 · 7 comments
Closed

Arduino/bc66/i2c_oled #2

cskocsis opened this issue Sep 8, 2019 · 7 comments

Comments

@cskocsis
Copy link

cskocsis commented Sep 8, 2019

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
Copy link
Owner

Wiz-IO commented Sep 8, 2019

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
Copy link
Author

cskocsis commented Sep 8, 2019

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
Copy link
Owner

Wiz-IO commented Sep 8, 2019

:) level translator

@cskocsis
Copy link
Author

cskocsis commented Sep 8, 2019

Thanks! :)

@cskocsis cskocsis closed this as completed Sep 8, 2019
@Wiz-IO
Copy link
Owner

Wiz-IO commented Sep 8, 2019

or try clear display buffer

@Wiz-IO
Copy link
Owner

Wiz-IO commented Sep 8, 2019

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

@Wiz-IO
Copy link
Owner

Wiz-IO commented Sep 8, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants