I'm totally new to arduino and everything it has to offer, as well as to programming in general. I signed up for a local group to work with arduinos and we were given a new task to display a message on an LCD with a countdown beneath it.
For ex, "Main Green" countdown timer goes from 7 seconds to 0 and then switches to "main yellow" for 2 seconds(2-0), and "Side green" for 3 seconds (3-0). I've been able to display "Main Green" but I can't understand how to program the backwards countdown and then switching to the next statement.
Anyone can help? Or at least move me in the right direction... Thanks! I'm going crazy over here trying to figure it out
I have tried to grasp your idea from your textual description, and then I have tried to transform it into the following events diagram. Please, let me know if I have really understood your project idea! Should the event diagram make sense, the coding of this diagram into an Arduino Language would be not too difficult.
A: Working Principle: 1. Total time is 7 + 2 + 3 = 12 seconds 2. At t= 0 (Start Time), message Main Green will appear on Top Line of LCD. At the same time, Counter will be loaded by 7; 7 will appear on Bot Line of LCD. Counter will be decremented 1-sec.
3 At t = 7 (end of message Main Green message), the message main yellow will appear on the LCD. At the same time, Counter will be re-loaded by 2 and will be counting down by 1-sec.
4. At t =9 (end of message main yellow), the message Side green will appear on the LCD. At the same time, Counter will be re-loaded by 3 and will be counting down by 1-sec.
5. At t=12, the session comes to an end. UNO reset will begin the next cycle.
B: Solution Hints: The following is the Flow Chart for the Step-2 of Section-A.