Question: Question 7 A sketch includes the following lines in the main loop: if(Pswitch! Pold)){ Pold-Pswitch; if(Pswitch){ state=!state; } } 4 Points Describe what will

Question 7 A sketch includes the following lines in the main loop: if(Pswitch! Pold)){ Pold-Pswitch; if(Pswitch){ state=!state; } } 4 Points Describe what will happen to the variable named "state", initially LOW, when the variable "Pswitch" is run through the following sequence: initially LOW, stays LOW for 2 seconds, goes HIGH, stays HIGH for 5 seconds, goes LOW, stays LOW for 3 seconds, goes HIGH, stays HIGH for 4 seconds, goes LOW and stays LOW. Use the editor to format your answer
Step by Step Solution
3.43 Rating (162 Votes )
There are 3 Steps involved in it
The variable state will remain LOW when Pswitch is initially LOW and sta... View full answer
Get step-by-step solutions from verified subject matter experts
