Refactoring a sketch i found that this code generate the error: "Batt_Tester_v1_0_3x:27: error: 'LeggiDefaults' was not declared in this scope".
the error disappeared commenting the line setting the LCD parameters but:
- the code for LCD display should not be compiled because LCDScreen if undefined;
- commenting the LCD settings doesn't interfere with the language sintax of the sketch.
Is this a bug??
am I wrong in something?
Thank you
Bye
Fabrizio
//#define LCDScreen
#include <FastIO.h>
#ifdef LCDScreen
#include <I2CIO.h>
#include <LCD.h>
#include <LiquidCrystal.h>
#include <LiquidCrystal_I2C.h>
#include <LiquidCrystal_SR.h>
#include <LiquidCrystal_SR2W.h>
#include <LiquidCrystal_SR3W.h>
#include <Wire.h>
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // Set the LCD I2C address
#endif // LCDScreen
//---------------------------------------------------------------------------
// the setup function runs once when you press reset or power the board
void setup() {
LeggiDefaults();
}
//---------------------------------------------------------------------------
// the loop function runs over and over again forever
void loop()
{
}
//---------------------------------------------------------------------------
void LeggiDefaults()
{
}
//---------------------------------------------------------------------------