I tried using the library and I am getting compiler errors as follows :
LiquidCrystal.cpp: In member function 'virtual void LiquidCrystal::setBacklight(uint8_t)':
LiquidCrystal.cpp:173:10: error: expected primary-expression before ')' token
LiquidCrystal.cpp:173:46: error: 'NOT_ON_TIMER' was not declared in this scope
The error is with following function in (Bold) LiquidCrystal.cpp
void LiquidCrystal::setBacklight ( uint8_t value )
{
// Check if there is a pin assigned to the backlight
// ---------------------------------------------------
if ( _backlightPin != LCD_NOBACKLIGHT )
{
// Check if the pin is associated to a timer, i.e. PWM
// ---------------------------------------------------
if(digitalPinToTimer(_backlightPin) != NOT_ON_TIMER) // Changed NOT_ON_TIMER since it is causing errors.
{
// Check for control polarity inversion
// ---------------------------------------------------
if ( _polarity == POSITIVE )
{
analogWrite ( _backlightPin, value );
}
else
{
analogWrite ( _backlightPin, 255 - value );
}
}
// Not a PWM pin, set the backlight pin for POSI or NEG
// polarity
// --------------------------------------------------------
else if (((value > 0) && (_polarity == POSITIVE)) ||
((value == 0) && (_polarity == NEGATIVE)))
{
digitalWrite( _backlightPin, HIGH);
}
else
{
digitalWrite( _backlightPin, LOW);
}
}
}
> i2c scanner is working fine and it detects the i2c address of my LCD.
Any help ?
thanks,
Pubudu