Recitation 2: Arduino Basics

For this week’s recitation, we built three circuits with Arduino.

Materials:

  • 1 * Arduino Uno
  • 1 * USB A to B cable
  • 1 * breadboard
  • 1 * buzzer
  • 2 * LEDs
  • 2 * 220-ohm resistors
  • 2 * 10K-ohm resistors
  • 2 * pushbuttons
  • A handful of jumper cables

 

 

 

 

 

 

 

 

 

 

Circuit 1:

The first is a simple circuit to connect an Arduino and a breadboard, and the code is to fade the lights. Connect the 220-ohm resistor and a LED to the circuit, and one end of the wire is connected to the ground, another is connected to the pin9. We succeeded on the first try, we studied the code for a while to see how it worked.

Circuit 2:

And for the second circuit, it basically turns the LED in the first circuit into a buzzer. The code we use is to make the buzzer play a piece of music. It is so funny to hear that there are different kinds of music playing all around the classroom. And we couldn’t hear it very clearly at first because of the poor contact between the cable and breadboard. When the short music was being played, we felt very excited.

The buttons are connected with 5V for the power and also connected with pin11 and pin10 respectively for input. Two LEDs are connected with resistors for limiting the current to protect the circuit and also connected with pin2 and pin3 respectively for output. The buzzer is connected with pin8 for output.
Circuit 3:

It is very complicated and needs a lot of time to make completed.

The biggest problem we had when connecting this circuit was that the wires tended to fall out and the connections were fragile, so we spent some extra time checking every component and every wire connection. At first, we only had sound but no lights when one side won the game, so we checked that the link was wired correctly and that the LEDs were working. Then we changed another cable and LED, to make the whole thing even more stable. Finally, we succeed.

Question 1: Another kind of button could be the cardboard button we built in Recitation1. In fact, we did try, connecting the cardboard buttons to the circuit. We tested the game again and we found that using the cardboard buttons can be pressed faster than normal buttons. Loki changed his buttons to cardboard buttons, and I still use the previous button. I can win him a lot when we both use the regular buttons, but only a little when he changes the cardboard buttons. I thought of another creative button that connects a pressure sensor to the button. Pressure can only be recorded if it is good enough. This increases the difficulty of the game. According to physical calculations, “Without a computer, you can connect a button you press to a light that is on. With a computer, you can make the relationship between buttons and lights more complicated.” “For many people, the input is All they want to learn from physical computing. They are already satisfied with their ability to express themselves on a computer through a screen or speakers but feel limited by mouse and keyboard input. Input is often easier than output because perception Activity requires less energy than moving things.” The input is often so simple that people may not pay attention to the input. Building a creative button can make the circuit more interactive because it improves input and humans can have more opportunities to interact with the circuit. Question 1: Another kind of button could be the cardboard button we built in Recitation1. In fact, we did try, connecting the cardboard buttons to the circuit. We tested the game again and we found that using the cardboard buttons can be pressed faster than normal buttons. Loki changed his buttons to cardboard buttons, and I still use the previous button. I can win him a lot when we both use the regular buttons, but only a little when he changes the cardboard buttons. I thought of another creative button that connects a pressure sensor to the button. Pressure can only be recorded if it is good enough. This increases the difficulty of the game. According to physical calculations, “Without a computer, you can connect a button you press to a light that is on. With a computer, you can make the relationship between buttons and lights more complicated.” “For many people, the input is All they want to learn from physical computing. They are already satisfied with their ability to express themselves on a computer through a screen or speakers but feel limited by mouse and keyboard input. Input is often easier than output because perception Activity requires less energy than moving things.” The input is often so simple that people may not pay attention to the input. Building a creative button can make the circuit more interactive because it improves input and humans can have more opportunities to interact with the circuit.

Question2: Using a 10K resistor per button can effectively avoid short circuits and keep the pins from floating. A 10k resistor pulls the digital input pin down to GND when the switch is on. This way, we can ensure that the button will work properly.

Leave a Reply

Your email address will not be published. Required fields are marked *