marcmerlin/NewLiquidCrystal

Compiling error with esp32 board

Closed this issue · 4 comments

I try HelloWorld_i2c with ESP32 Dev Module
Error
`Compiling 'HelloWorld_i2c' for 'ESP32 Dev Module'
LiquidCrystal.cpp: In member function virtual void LiquidCrystal::setBacklight(uint8_t)

LiquidCrystal.cpp: 190:48: error: 'analogWrite' was not declared in this scope
analogWrite ( _backlightPin, value )

Error compiling libraries
Build failed for project 'HelloWorld_i2c'
LiquidCrystal.cpp: 194:54: error: 'analogWrite' was not declared in this scope
analogWrite ( _backlightPin, 255 - value )`

It's error because it cannot found <WProgram.h> or <Arduino.h> in LiquidCrystal.cpp
Remember: I try HelloWorld_I2C,
If I choose original arduino board or esp8266, it's okay. But error with esp32
Please check it.

Sorry, for some reason I never got an Email for this. My apologies.
Can you confirm that it works on ESP32 when you comment out these lines?
Can you confirm which line(s) exactly, or better, submit a pull request?

Ah, I missed that it's the I2C code which I didn't write and don't use. I only wrote the _SR driver in this fork.
You should try the upstream project for I2C issues: https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home

duplicate of #1
closing