Skip to content

Dacili/Arduino-projects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Arduino-projects

1. Traffic lights

Note: to check the full video, check the one in the files.

VID_20230704_161531.1.cut.mp4

2. Traffic lights with buttons

VID_20230710_144923.online-video-cutter.com.mp4

3. Traffic lights - with only one 3 pin LED

3 pin LED are specific LED, which can show 3 different colors based on the inputs. The middle pin is negative. image
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

4. Password check - with keypad and LCD

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

Wokwi.com things

In sketch.ino tab, you can check the actual code. image
If you use include statements for some libraries, make sure you added libraries in that tab: image
image

In diagram.json tab, you have all info about created scheme:
image
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.
image
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.
image
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:
image

5. Digital Humidity and Temperature sensor alarm

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

6. Motion alarm

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



A little theory

LED diode:

image
The longer one is the anode, shorter one is the cathode. If you switch the wires, it will just not work.

How to connect LED diode to Arduino?

We're always connecting the cathode (-) to the GND.
image
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.
image

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:
image
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?
image

Releases

No releases published

Packages

No packages published

Languages