Introduction: Setting Up the Circuit
Step 1: Connecting Power and LEDs
Just as you’ve been doing in other projects, start by wiring up your breadboard so that the 5 volt and GND pins on the Arduino are connected to the voltage rails on the breadboard.
Next, add the three red LEDs to the breadboard, as shown. These will be the indicator or "bar graph" lights for the project.
- Connect the 5 volt and ground pins on the Arduino to the power and ground rails on the breadboard with wires. You can change the wire colors if you want to!
- Place the three LEDs on the breadboard in row E, spaced 2 breadboard sockets apart.
- Use a 220 Ohm resistor to connect each LED's cathode (left leg) to the ground rail (black) of the breadboard. You can change a resistor's value by highlighting it and using the dropdown menu.
- Connect the LED anodes (right legs) to digital pins 4, 3, and 2 on the Arduino.
- Continue to the next step.
- Stuck? HINT: Review: The LED anode is the terminal that current flows into. This will connect to the digital output pins on the Arduino. The cathode is the terminal that current flows from. This will connect to the ground rail.
Step 2: Connecting the Temperature Sensor
Next, ￼￼place the temperature sensor (TMP36) on the breadboard with the rounded part facing away from the Arduino, as shown in the figure. (The order of the pins is important!) In the simulator, it should already be oriented in the right direction when you drag it from the Components + menu.
If you hover over the temperature sensor pins with your cursor the left side (Vs) connects to power, the middle (Vout) communicates with the Arduino, and the right (GND) connects to ground. Full instructions for wiring this component are below.
- Place the temperature sensor on the breadboard in row E, as shown.
- Wire up the temperature sensor so the left pin connects to the 5V voltage rail, the center pin connects to A0 on the Arduino, and the right pin connects to the GND rail.
- Continue to the next step to learn how to program the Arduino!
Next Lesson:Writing the Code
We have a be nice policy.
Please be positive and constructive.