Hi
I am using a Tracer class that encapsulate all tracing feature (serial lcd) My Lcd is rebooting when I pass its instance to UltraCmd
LiquidCrystal lcd(7, 8, 9, 10, 11, 12) ;
SRF02 sonicsensor = SRF02(0x70, SRF02_CENTIMETERS);
FunctionalTasks FuncTask ;
UltrasonCmd UltraCmd ;
// ENTREES
//
// SETUP
//
void setup() {
// SERIAL
Serial.begin(9600);
// LCD
lcd.begin(16, 2);
lcd.setCursor(0, 0);
lcd.clear();
delay(2000);
PinMng.setTracer(&Tracer);
// pass lcd to tracer and tracer to all others objects
Tracer.setLcd(&lcd);
delay(200);
// FuncTask.setSonicSensor(&sonicsensor);
// UltraSonic Sensor
UltraCmd.setSonicSensor(&sonicsensor);
UltraCmd.setTracer(&Tracer);
UltraCmd.setDistToOnRelays(80);
UltraCmd class
void UltrasonCmd::setTracer(Traces *TracerPtr) {
if ( TracerPtr != NULL )
{
_Tracer = TracerPtr;
_Tracer->Print("Tracer is available on UltraCmd instance");
}
}
I see the trace just above.