ARDUINO UNO
Arduino Uno is a development board developed by Arduino.cc, an open-source electronics platform mainly based on AVR microcontroller Atmega328.
Basically, an Arduino is a microcontroller, for a basic understanding microcontroller is something the controls the data or in very basic language, it can be said that Arduino is a device that gives a required output to us stated that we give the required inputs to it.
For instance –
1. We need to switch on the fan just by clapping.
2. Send a text message at a particular time.
3. Closes the tap when the bucket is filled with water.
ARDUINO IDE
To set the instructions for arduino, we need a software in which we can write the code and upload to the arduino so that the arduino can perform as required. Once the code is uploaded the arduino will function accordingly. To write the program few basics of coding are required.
You can download the IDE from here
Once the Arduino IDE is downloaded is looks something like this. Mainly code is written in two areas, void setup() and void loop() . Void setup() is the place where declaration are intialized and Void loop() is the are where output action(what arduino should perform) code should be written.
SENSORS AND ACTUATORS
These are something that provides input information to the Microcontroller (Arduino)
For ex: alcohol sensor, touch sensor, vibration sensor, keypad, touch screen.
These are the mostly electromechanical components that perform output action, and are controlled by the code ,which was uploaded to the board by the IDE.
For ex: Motors, LED lights, display, buzzer.
ARDUINO UNO BOARD
Arduino UNO ATmega328
It a 8-bit microcontroller chip used in the arduino board.
Flashmemory | 32K bytes |
Maximum clock frequency | 20MHz |
EEPROM | 1K byte |
Internal SRAM | 2K bytes |
PWM channels | 6 |
Programmable I/O lines | 23 |
8 bit counter | 2 |
16 bit counters | 1 |
CRYSTAL OSCILLATOR
Crystal oscillators are used in arduino because it helps when Arduino is dealing with time issues, for example if we build a project that turns a switch A OFF after 15 minutes ON and turn ON switch B, C & D one after another with a 20 minutes step. We can use Arduino software to program Arduino to do that.
The number on the top of Arduino crystal is 16.000H9H this gives us information about the frequency which is 16,000,000 Hertz or 16 Mhz, this small component can make 16 millions cycles per second so using this concept Arduino can calculate time.
POWER SOURCE PINS
These are on board pins on arduino that are used to give power to the sensors and actuators. And also they have few GND (ground) pins that should be connected to the sensors and actuators to close the circuit.
DC POWER JACK
This is used to supply power for arduino board using a power jack, and also a voltage regulator that provides a constant voltage (5V) to arduino board
SAMPLE CODE
Let us write a code for LED blinking, which blinks for a time period and stops for defined period.
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}