Professional Documents
Culture Documents
ABEN23_Laboratory 1_umba
ABEN23_Laboratory 1_umba
Laboratory Activity 1
Instruction. Create a circuit and/or a sketch. Use variables in writing your code. Submit your
code/ program in pdf. For the circuit, submit a video file showing the code in your computer and
the working circuit in google classroom. The pdf and the video file should be submitted
separately.
Circuit and Sketch 2
int ledRed = 8;
int ledYellow = 9;
int ledGreen = 10;
void setup()
{
pinMode(ledRed, OUTPUT);
pinMode(ledYellow, OUTPUT);
pinMode(ledGreen, OUTPUT);
}
void loop()
{
for (int x = 0; x < 5; x = x + 1){
digitalWrite(ledRed, HIGH);
delay(250);
digitalWrite(ledRed, LOW);
delay(250);
}
for (int x = 0; x < 10; x = x + 1){
digitalWrite(ledYellow, HIGH);
delay(250);
digitalWrite(ledYellow, LOW);
delay(250);
}
for (int x = 0; x < 15; x = x + 1){
digitalWrite(ledGreen, HIGH);
delay(250);
digitalWrite(ledGreen, LOW);
delay(250);
}
}
Circuit and Sketch 3