Hi All
I am totally new to the world of Arduoino, so please take it easy with me !
I have written this menu system to control drip production using a solenoid valve. All was going well until I first connected my Uno to the hardware. After disconnection, I added some more code
and have been getting unexpected freezes and occasionally a whole heap of garbage sent to Hyper Terminal ever since.
Currently with the code as is, if I put the commented line into DislpayBottomMenu(), then after 1 pass through the loop() execution stops (or serial comms does anyway).
If I enable the call to DislpayBottomMenu() in setup(), half of the first line if DislpayBottomMenu() makes it up the comm port then freezes or stops!!!
void DisplayBottomMenu()
{
Serial.print("==================MENU=====================\r\n");
Serial.print("1 Alter Trigger delay (Currently " ); Serial.print(Trigger_Delay,DEC);Serial.print(" ms)\r\n");
Serial.print("2 Alter Solenoid Actuation delay (Currently "); Serial.print(SolenoidActuation_Delay,DEC); Serial.print(" ms)\r\n");
Serial.print("3 Alter Drip delays (Currently "); Serial.print(SequenceDrip_Delay[0],DEC); Serial.print(" and ");Serial.print(SequenceDrip_Delay[1],DEC);Serial.print(" ms)\r\n");
Serial.print("4 Alter Number of Drips in Sequence (Currently "); Serial.print(DripsInSequence,DEC); Serial.print(")\r\n");
// =========== PROBLEM ADDING THIS LINE
// Serial.print("5 Alter Drip Formation Time (Currently "); Serial.print(DripFormationTime,DEC); Serial.print(")\r\n");
Serial.print("D Show Current Variable Values"); Serial.print("\r\n");
Serial.print("R Start");Serial.print("\r\n");
Serial.print("S Stop"); Serial.print("\r\n");
Serial.print("F Flush the serial port buffer"); Serial.print("\r\n");
Serial.print("C Clear the Screen"); Serial.print("\r\n");
MenuLevel = 0;
}
I cant see ANY pattern to the errors Im getting, they seem totally random.
The .ino file is attached.
I’d be Very grateful for any help or ideas as to how to proceed.
Incidentally, what stand alone debug tools are best for sketch coding ??
Thanks
Phil
simple_serial_4.ino (11.4 KB)