Hi. Am used ESP32 with C implementation. I have a problem of used LiquidCrystal_I2C Lib from https://github.com/JagoST7/LiquidCrystal_I2C
What I did is Copy the whole thing to my project folder…
demo-c / -include -src -mjs_fs
And I modify my mos.yml By add
includes:
- include
config_schema:
- [“i2c.enable”, “b”, true, {title: “Enable I2C”}]
- [“i2c.sda_gpio”, “i”, 21, {title: “GPIO to use for SDA”}]
- [“i2c.scl_gpio”, “i”, 22, {title: “GPIO to use for SCL”}]
libs:
And inside main.c I declare
#include "LiquidCrystal_I2C.h"
I got compiler error not sure what wrong. Please help me to set “Hello World” on LCD in C
/demo-c/esp32/build_contexts/build_ctx_382560242/include/LiquidCrystal_I2C.h:60:1: error: unknown type name ‘class’
class LiquidCrystal_I2C {
^~~~~
CC /data/fwbuild-volumes/latest/apps/demo-c/esp32/build_contexts/build_ctx_382560242/build/objs/newlib/poll.o
/data/fwbuild-volumes/latest/apps/demo-c/esp32/build_contexts/build_ctx_382560242/include/LiquidCrystal_I2C.h:60:25: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘{’ token
class LiquidCrystal_I2C {
^