Control with a button
We need to add parts to the code to make this work. Before we had just the loop, now we add if and else. Every green part of your code needs an open and closing { } to run. The curly brackets are like sandwiches for your statements. Make sure each has them.
Write a code similar to below and upload it to your board to see if it works.
Write a code similar to below and upload it to your board to see if it works.