You will need the following blocks.
Connect them as follows.
Double click on the first Digital in node.
Select the right push button to pause the timer. Select the method as Interrupt.
Double click on the second Digital in node.
Select the left push button to start the timer. Select the method as Interrupt.
Double click on the Analog in node. Select pin as POT and method as Interrupt.
Be sure that you have selected the correct Device Id in all of the above.
Change Node?
Change node will allow you to change a message payload or add new properties.
Double click on the following two change nodes and change as follows.
Double click on the Switch node and change as follows.
Double click on the trigger node and change as follows.
Double click on the Counter node and change as follows.
Make sure to connect the output of the counter node as follows.
Double click on the Display node and change as follows.
Deploy the program.
From the left button, you can start the timer.
From the right button, you can pause the timer.
By rotating the POT, you can reset the timer.
Comments
Please log in or sign up to comment.