Skip to content

Commit e3a167e

Browse files
author
Lenardgeorge
committed
Changes in Finger Race Stage3
1 parent 855e14f commit e3a167e

File tree

5 files changed

+12
-10
lines changed

5 files changed

+12
-10
lines changed

Examples/Lessons/L7_AnalogInputs/L7_Activity3/L7_Activity3.ino

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1+
12
/*
23
CTC GO! CORE MODULE
34
LESSON 07 - Analog Inputs
45
56
This sketch is written to accompany Activity 3 in Lesson 07 of the CTC GO! core module
67
*/
78

8-
9-
int USsensor = A0;
10-
int yellowLED = 9;
11-
int redLED = 11;
12-
int greenLED = 13;
9+
int USsensor = A0;
10+
int greenLED = 9;
11+
int yellowLED = 11;
12+
int redLED = 13;
1313

1414
float distance = 0;
1515
int value = 0;
@@ -37,11 +37,14 @@
3737
if (distance < 200)
3838
{
3939
digitalWrite(redLED, HIGH);
40+
digitalWrite(yellowLED, LOW);
41+
digitalWrite(greenLED, LOW);
4042
}
4143
else if (distance < 400)
4244
{
4345
digitalWrite(yellowLED, HIGH);
4446
digitalWrite(redLED, LOW);
47+
digitalWrite(greenLED, LOW);
4548
}
4649
else if (distance < 600)
4750
{
@@ -54,6 +57,5 @@
5457
digitalWrite(greenLED, LOW);
5558
digitalWrite(yellowLED, LOW);
5659
digitalWrite(redLED, LOW);
57-
5860
}
5961
}

Examples/Projects/P1_FingerRace/P1_FingerRace_Stage3/P1_FingerRace_Stage3.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ int button_P1 = 6;
1212
int button_P2 = 7;
1313

1414
int blueLED_P1 = 12;
15-
int blueLED_P2 = 11;
15+
int blueLED_P2 = 10;
1616

1717
int gameState = 0;
1818

Examples/Projects/P1_FingerRace/P1_FingerRace_Stage4/P1_FingerRace_Stage4.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
int greenLED_P1 = 13;
99
int blueLED_P1 = 12;
1010

11-
int blueLED_P2 = 11;
11+
int blueLED_P2 = 10;
1212
int greenLED_P2 = 9;
1313

1414
int button_P1 = 6;

Examples/Projects/P1_FingerRace/P1_FingerRace_Stage5/P1_FingerRace_Stage5.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
int greenLED_P1 = 13;
99
int blueLED_P1 = 12;
1010

11-
int blueLED_P2 = 11;
11+
int blueLED_P2 = 10;
1212
int greenLED_P2 = 9;
1313

1414
int button_P1 = 6;

Examples/Projects/P1_FingerRace/P1_FingerRace_Stage6/P1_FingerRace_Stage6.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
int greenLED_P1 = 13;
99
int blueLED_P1 = 12;
1010

11-
int blueLED_P2 = 11;
11+
int blueLED_P2 = 10;
1212
int greenLED_P2 = 9;
1313

1414
int button_P1 = 6;

0 commit comments

Comments
 (0)