Creating a temperature gauge with 3 LED’s and a TMP analogue temperature sensor.
Here is my code working with the Serial monitor showing up the value, voltage and the degrees (C).
To make this project work I setup up once again 3 LED’s but this time set them up too connect to a photo resistor which when hit a certain degree in temp would turn on each of the LED’S.
Here is my code for this project (not I added an extra delay function so that there is a time delay between the last red light and the green.
To create this project i connected up 3 led’s that would trigger once the push button was activated. it would then go from a green light to a red then to the second red and back to green.
this worked by using delay statement which acts as a timer for high and low pins.
The last LED lesson was to have both buttons light up the LED individually. To do this you have to change the circuit so that the buttons get power through the resistor individually, so a wire goes from the resistor to the second button (as the first button is already inline with the resistor it is getting power) then we connect the first button with the large leg of the LED and the second button with the large led on the LED, the small leg still just connected to the ground and done.
We have both buttons connected individually to the LED.
Next step was to see exactly how the circuit worked. By placing another button on the breadboard and connecting it within the circuit we now have to press both buttons for the LED to light up.
Note: i just moved the LED down a few slots and placed a wire from button to button then to the longer leg of the LED.
Adding a resistor 220ohms (how to calculate between the different resistors will be posted soon) to a power slot in the breadboard and any prototyping slot, followed by the adding of a button (in the centre of the board, and an LED (anywhere within the prototyping area with power).
Next I added a ground wire from the (-) to a slot inline with the small leg of the LED (has to be inline with the LED otherwise it won’t be grounded) and another wire from button to the longer leg of the LED to complete the circuit.
Now when you plug in the Arduino board and press the button it lights up.
Setting up the Arduino. Quick and easy set-up, followed by the first lesson. Creating an L.E.D blink. Using the RED cable as power from the power pin in the Arduino board to the power (+) in the breadboard to give the circuit power and the BLACK cable as the grounding cable from the grd pin in the Arduino board to the ground (-) on the breadboard.