I2C Demo Sketch 2018
In this older sketch from 2018 I am trying to make it work for me.
Line--LiquidCrystal_I2C lcd(i2c_addr, en, rw, rs, d4, d5, d6, d7, bl, POSITIVE);
I keep getting error--exit status 1,
'POSITIVE' was not declared in this scope' And I don't know how to fix it.
If anyone can help I would be very grateful, since I'm new to this.
Positive is located in LiquidCrystal_i2c.h around line 162 for my h file
/* PCF8574 backlight controls */
typedef enum : uint8_t
POSITIVE = 0x01, //backlight switching polarity
NEGATIVE = 0x00 //backlight switching polarity
Sorry if this question is self-evident, but is the LiquidCrystal_i2c.h included in the library?
(◕(' 人 ') ◕)
@sean451yes it is
Check to see if POSITIVE is declared after the sketch is trying to use it?
@melbul How do I show it as being declared? I'm very new at programming.
Likewise, very new at this, but an issue is, if you call for variable before it has been set up, you will get that error.
The Arduino IDE lets you get away with setting your variables anywhere in the sketch but other IDe's won't!