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

error: 'SPI_CLOCK_DIV2' was not declared in this scope while using I2C LCD #3

Open
KanG00 opened this issue Jun 14, 2024 · 1 comment

Comments

@KanG00
Copy link

KanG00 commented Jun 14, 2024

Hi,

I'm trying to use this library with Wiznet LCD1602 screen based on chip AIP31068L.
Unfortunately although I'm using I2C library and definition code tries to call SPI settings

/Users/xxx/Documents/Arduino/libraries/LiquidCrystal_AIP31068/LiquidCrystal_AIP31068_SPI.cpp: In member function 'void LiquidCrystal_AIP31068_SPI::begin(uint8_t, uint8_t, uint8_t)': /Users/xxx/Documents/Arduino/libraries/LiquidCrystal_AIP31068/LiquidCrystal_AIP31068_SPI.cpp:83:34: error: 'SPI_CLOCK_DIV2' was not declared in this scope 83 | softspi->setClockDivider(SPI_CLOCK_DIV2); | ^~~~~~~~~~~~~~

The relevant code part is:

#include <Wire.h>
#include <LiquidCrystal_AIP31068_I2C.h>

LiquidCrystal_AIP31068_I2C lcd(0x3E, 16, 2);

void setup() {

lcd.init();                   
lcd.setCursor(0,0);
lcd.print("Hello, world!");

}

Im connecting LCD to W5500-EVB-Pico , so raspbery Pi Pico ports GP4 and 5.
I2C address was scanned and is correct.

Please help

@red-scorp
Copy link
Owner

Hi!
Check what version of SoftSPIB library do you use. Update it if possible.
Open SoftSPIB's Loopback example, add setClockDivider(SPI_CLOCK_DIV2) and see if it works there.
The problem is some platforms do not define SPI_CLOCK_DIVXXX macros any longer.

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