Successfully Added To Cart

EXERCISE SOLUTIONS:

Question 1

Add this to the program:

else if (roll == 7){
digitalWrite (ledSet1, HIGH); digitalWrite (ledSet2, HIGH); digitalWrite (ledSet3, HIGH); digitalWrite (ledSet4, HIGH);
}

Question 2

Change this code:

else if (roll == 6){
digitalWrite (ledSet1, HIGH);
digitalWrite (ledSet2, HIGH);
digitalWrite (ledSet4, HIGH);
delay(500);

digitalWrite (ledSet1, LOW);
digitalWrite (ledSet2, LOW);
digitalWrite (ledSet4, LOW);
delay(500);

digitalWrite (ledSet1, HIGH);
digitalWrite (ledSet2, HIGH);
digitalWrite (ledSet4, HIGH);
}

Question 3

You should notice that the breadboard is divided into 2 halves, separated by the divider across the middle.
The power rail on the bottom of the breadboard is connected to the UNO R3. We can extend that connection to the top half of the breadboard by connecting the two power rails with a jumper wire.

Bonus Question

Download the code above (the 'I Give Up' file) for the solution to this question.