Assigment 5 – Digital inputs

In this week’s assignment we test the use of digital inputs using two push buttons to turn an LED on or off. Pressing one button turns the LED on and pressing the other button turns it off. We connected the wires as shown in the diagram and added the code to activate the control of the LED. After successful testing we decided to make a few modifications by using a state diagram to control the LED using only one button. The code we used is displayed in the diagram below.































Leave a comment