red-scorp / LiquidCrystal_AIP31068

A library for AiP31068 based I2C/SPI LCD displays
3 stars 3 forks source link

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

Open KanG00 opened 2 weeks ago

KanG00 commented 2 weeks ago

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

include

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 commented 2 weeks ago

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.