This is a collection of Arduino based projects that demonstrate the usage of various sensors and components.
- Buzzers
- DHT
- Gyroscope
- IR Receiver
- Joystick
- LCD
- PIR Motion Sensor
- Remote Custom
- Remote Default
- RFID
- RGB LED
- Servo Motor
- Seven-Segment Display
- Sound Sensor
- Stepper Motor
- Ultrasonic Sensor
There are currently no planned projects
An Arduino board is an open-source programmable microcontroller board. There are many versions of Arduino boards like the Uno, Mega, Leonardo, Nano and a lot of others. For these projects we will be using an Arduino Uno. It can be powered by USB or by an external 9V battery (It supports 7-20V inputs). Some of the projects in this repository require libraries to work. Libraries are downloaded through the Library Manager in the Arduino IDE.
A breadboard is a construction base for prototyping of electronics. It is a plastic board with a lot of holes which are connected in a specific way. The holes let you easily insert electronic components and connect them with jumper cables which is very useful for testing circuits. There are two strips on each side labeled "+" and "-" used to supply power and they are connected by column. The board is divided in two halves vertically and all of the holes in each half are connected by row.
Resistors are electronic components used to limit the current in a circuit. To calculate the current use Ohm's law. Resistors don't have a polarity, which means they can be connected in either direction. To find out the resistance of your resistor look up resistor color codes.
A diode is a two-terminal electronic component that conducts current primarily in one direction. It has low resistance in one direction, and high resistance in the other. Watch out connecting diodes, because connecting them the wrong way can damage them.
An LED is a diode that emmits light. Like all diodes it has an anode(+) and a cathode(-), the shorter pin being the cathode and the longer pin being the anode. The voltage drop accross an LED is 1.8-2.2V. The current dictates the LED brightness. The operating amperage is 20mA (max 30mA), althought 10mA is sufficiently bright. They are usually connected to the Arduino through a 220ohm resistor. That resistance value was chosen because 220ohms is a standard resistor value nearest to the optimal calculated using Ohm's law. The actual optimal is 128ohms, but accounting for fault tolerances of +/- 5-10%, 220ohms is a better choice.
A transistor is a semiconductor device used to amplify or switch electronic signals and electrical power. Transistors have three pins: collector, base and emitter. Note that the order of the pins vary between different transistors. When the power is supplied to the base it lets current pass from the collector to the emitter. To use a transistor as an amplifier connect the input signal to the base. This works because the power required to activate the base is less than the power supplied by the power source.
Push buttons are used to open or close a circuit. They can be connected to the Arduino with a pull up or pull down connection. For the pull up connection one side of the button should be connected to the Arduino input pin and 5V with a 1kohm resistor between them, and the other side to the ground. The pull down connection is the same except ground and 5V connections are swapped. The resistor is required not to short out the Arduino. Another way to connect a button is to set the pin mode to INPUT_PULLUP and connecting the button to ground and the input pin.
On linux, if you get a permission denied on /dev/ttyACM0 error run the following command:
sudo chmod a+rw /dev/ttyACM0
Just replace ttyACM0 with the port from your error message