HTMAA 2023 > EECS Group Assignments > Week 4

Electronics Design

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.

5V Power

5v

3V3 Power

3v3

High Ouptut

high

Low Output

low

Switch Output

For this one, we used a while loop to toggle a pin on and off switch

PWM Output

For this pin, we used analogWrite to output a PWM signal with 95.7% duty cycle using a value of 244. pwm

Source Code

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);
  }
}