For this week, we used an ocsilloscope to test the operations of an Arduino Uno. We tested its 5v and 3.3v power rails, as well as its pin outputs.
For this one, we used a while loop to toggle a pin on and off
For this pin, we used analogWrite
to output a PWM signal with 95.7% duty cycle using a value of 244.
This is the code we used to test the Arduino Uno
void setup() {
// put your setup code here, to run once:
pinMode(2, OUTPUT);
pinMode(4, OUTPUT);
pinMode(7, OUTPUT);
pinMode(3, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(2, HIGH);
digitalWrite(7, LOW);
while(true){
digitalWrite(4, HIGH);
digitalWrite(4, LOW);
analogWrite(3, 244);
}
}