Giới thiệu về Arduino
Arduino là gì?
Arduino là một nền tảng phần cứng mở (open-source hardware) với phần cứng và phần mềm được thiết kế dựa trên tiêu chí dễ sử dụng. Các bo mạch Arduino dễ dàng nhận tín hiệu từ cảm biến: ánh sáng, nhiệt độ, độ ẩm,... ,và xuất tín hiệu để điều khiển Relay, Motor, LCD,...,thậm chí bạn có thể sử dụng Twitter để bật tắt bóng đèn hay thiết bị trong nhà sử dụng Arduino.
The Arduino Platform
Arduino is composed of two major parts:
The Arduino board , which is the piece of hardware you work on when you build your objects. Arduino senses the environment by receiving inputs from many sensors, and affects its surroundings by controlling lights, motors, and other actuators.
The Arduino IDE , the piece of software you run on your computer. You use the IDE to create a sketch (a little computer program) that you upload to the Arduino board. The sketch tells the board what to do.
You can tell your Arduino what to do by writing code in the Arduino programming language and using the Arduino development environment .
Not too long ago, working on hardware meant building circuits from scratch, using hundreds of different components with strange names like resistor, capacitor,LED, transistor, and so on. Every circuit was "wired" to do one specific application, and making changes required you to cut wires, solder connections, and more.
With the appearance of digital technologies and microprocessors, these functions, which were once implemented with wires, were replaced by software
programs.
Software is easier to modify than hardware. With a few keypresses, you can radically change the logic of a device and try two or three versions in the same amount of time that it would take you to solder a couple of resistors.
Click here to get the Arduino Language Reference
The Arduino software icon is showed below.
File:Ks0313图片1.png
Double-click the icon of Arduino to enter the desired development environment, you should see as below.
File:717.png
The functions of each button on the Toolbar are listed below:
The Arduino Hardware
The Arduino board is a small microcontroller board,which is a small circuit (the board) that contains a whole computer on a small chip (the microcontroller). It is a lot cheaper and very useful to build interesting devices.
The UNO is the best board to get started with electronics and coding. If this is your first experience tinkering with the platform, the UNO is the most robust board you can start playing with. The UNO is the most used and documented board of the whole Arduino family.
Look at the Arduino UNO REV3 Board:
File:ARDUINO UNO 1.jpg File:ARDUINO UNO 2.jpg
At first,all those connectors might be a little confusing. Here is an explanation of what every element of the board does: https://store.arduino.cc/arduino-uno-rev3
keyestudio UNO Development Board
Let's take a look at the details of this development board with the following chart:
File:UNO.png
File:KS0313 5.1-1.png | USB Connection
Arduino board can be powered via USB connector. |
File:KS0313 5.1-2.png | DC Power Jack
Arduino board can be supplied with power from the DC power jack |
File:KS0313 5.1-3.png | Voltage Regulator
To control the voltage provided to the Arduino board, as well as to stabilize the DC voltage used by the processor and other components. |
File:KS0313 5.1-4.png | Crystal Oscillator
Helping Arduino deal with time problems. How does Arduino calculate time? by using a crystal oscillator. The number printed on the top of the Arduino crystal is 16.000H9H. It tells us that the frequency is 16,000,000 Hertz or 16MHz. |
File:KS0313 5.1-5.png | Arduino RESET
You can reset your Arduino board, for example, start the program from the very beginning. Firstly, use the RESET button(17). Or you can connect an external reset button to Arduino pin 5 labeled RESET |
File:KS0313 5.1-6.png | Pin Header(3.3V,5V,GND,Vin
File:KS0313 5.1-7.png3.3V - provides 3.3V output voltage |
File:KS0313 5.1-11.png | Analog Pins
Arduino UNO board has 6 analog inputs, labeled A0 through A5. These pins can read the signal from analog sensors (such as humidity sensor or temperature sensor), and convert it into the digital value that can read by microcontrollers) |
File:KS0313 5.1-12.png | Microcontroller
Each Arduino board has its own microcontroller. You can regard it as the brain of your board. |
File:KS0313 5.1-13.png | ICSP (In-Circuit Serial Programming) Header
In most case, ICSP is the AVR,an Arduino micro-header consisting of MOSI, MISO, SCK, RESET, VCC, and GND.It is often called the SPI (serial peripheral interface) and can be considered an "extension" of the output.In fact, slave the output devices under the SPI bus host. |
File:KS0313 5.1-14.png | Power LED Indicator
Powering the Arduino, LED on means that your circuit board is correctly powered on. If LED is off, connection is wrong. |
File:KS0313 5.1-15.png | TX and RX LED
Onboard you can find two labels: RX(receive ) and TX (transmit) |
File:KS0313 5.1-16.png | Digital I/O
Arduino UNO has 14 digital input/output pins (of which 6 can be used as PWM outputs). These pins can be configured as digital input pin to read the logic value (0 or 1). Or used as digital output pin to drive different modules like LED, relay, etc. The pin labeled “〜” can be used to generate PWM. |
File:KS0313 5.1-17.png | AREF
Reference voltage( 0-5V) for the analog inputs. Used with analogReference(). |