Note: to check the full video, check the one in the files.
VID_20230704_161531.1.cut.mp4
VID_20230710_144923.online-video-cutter.com.mp4
3 pin LED are specific LED, which can show 3 different colors based on the inputs. The middle pin is negative.
Because I did not have a proper resistor, it turns out, I burnt this one after some time of usage... :(
VID_20230710_171313.1.mp4
This one is done in wokwi.com, it's an awesome online simulator, where you can use whatever you want for free!
The link for this project is https://wokwi.com/projects/370154336032915457
I wanted to use a few same pins for LCD and Keypad (that's the reason for the breadboard there), but I had issues where the LCD screen got randomly characters written when I was pressing the keypad. The reason for that is a side effect of sharing pins between these two, because LCD treats them as OUTPUTS, while Keypad treats them as INPUTS.
2023-07-14_14h07_29.mp4
In sketch.ino tab, you can check the actual code.
If you use include statements for some libraries, make sure you added libraries in that tab:
In diagram.json tab, you have all info about created scheme:
In parts, you have listed all components. In every part, you can provide attrs property, such as I did for LCD and resistor to customize them.
In connections, you have listed all your wires.
If you click on some element, when you're not running simulation, you will see ? icon. Clicking on that, you will be redirected to the documentation for that specific element.
Sometimes connecting many pins can be very tiring, for some element pins, when you click on it, and move the tire, it will automatically recommend where to connect that pin to Arduino pin, by marking it as white. Also, once you created a wire, you can adjust it's position by clicking on it, and moving the purple circles on the wires.
2023-07-14_14h38_02.mp4
While doing simulation, if you click on pause button, you will see in that moment which pin is input vs output info:
https://wokwi.com/projects/370509489417168897
When the temperature is high (> 50) then turn on the sound alarm. Unmute the video to hear the sound.
2023-07-17_17h15_57.mp4
https://wokwi.com/projects/370512764857309185
When motion is detected alarm is turned on. Unmute the video to hear the sound.
2023-07-17_17h40_45.mp4
LED diode:
The longer one is the anode, shorter one is the cathode. If you switch the wires, it will just not work.
We're always connecting the cathode (-) to the GND.
I was working without resistors (because I did not have a proper one xD), but that affects the lifetime of the LED.
Once you put the input into one hole on Arduino breadboard, then vertically that side of the breadboard has that input. Check the colored rectangles.
Resistors
The resistor is an electrical component that limits the flow of electrical current (in an electronic circuit).
Why do we need them?
If you try to connect the LED diode to the 9V battery, you will soon find out why! Haha, it will burn out because the capacity of the LED is smaller than the input we provided.
Forward voltage = the amount of voltage needed to get current to flow across a diode. (the minimum voltage required to turn on an LED)
Every LED diode, based on color, has a different forward voltage:
Voltage drop = the decrease of electric potential along the path of a current flowing in a circuit. (voltage lost across the diode when it is conducting current.)
(How much you actually lose energy, for ex. how much voltage do you actually use/lose on LED lighting and heating.)
How to read resistors, with color code calculations?