Hardware Reference
In-Depth Information
7.2 Analyzing Digital Output
To test digital output, we create Arduino app using Arduino Sketch. We use digital output
pin 9 and 8.
Write this code on Arduino Sketch.
int
pin1 =
9
;
int
pin2 =
8
;
void
setup
() {
pinMode(pin1, OUTPUT);
pinMode(pin2, OUTPUT);
}
void
loop
() {
digitalWrite(pin1,HIGH);
digitalWrite(pin2,LOW);
delay(
100
);
digitalWrite(pin1,LOW);
digitalWrite(pin2,HIGH);
delay(
200
);
}
Using Scanalogic-2, connect CH1 to digital output pin 9 and CH2 to digital output pin 8.
The following is a sample output from Scanalogic-2.
