Arduino

What is Arduino???


Arduino is an open-source electronics platform based on easy-to-use hardware and software. Arduino boards are able to read inputs, like light sensors, activating a motor, turning on an LED, etc. Note! outside the USA they have changed the name to Genuino.

A lot of different Arduino boards exists, but Arduino UNO is the most popular and used Arduino board.

Arduino board designs use a variety of microprocessors and controllers. The boards are equipped with sets of digital and analog input/output (I/O) pins that may be interfaced to various expansion boards ('shields') or breadboards (For prototyping) and other circuits. The boards feature serial communications interfaces, including Universal Serial Bus (USB) on some models, which are also used for loading programs from personal computers. The microcontrollers can be programmed using C and C++ programming languages. In addition to using traditional compiler tool chains, the Arduino project provides an integrated development environment (IDE) based on the processing language project.


Some of the important boards are:


Some Arduino-branded boards have been designed by the American companies SparkFun Electronics and Adafruit Industries.


Arduino RS-232
Arduino Uno R2

Arduino Duemilanove (rev 2009b)
Arduino Uno SMD R3



Arduino Diecimila
Arduino Duemilanove (rev 2009b)
                              
Arduino Micro (AtMega32U4)
Arduino Pro

Arduino Mega

Arduino pro micro (AtMega32U4)

Arduino Nano
 


Arduino LilyPad 00(rev 2007)

Arduino Robot 



Arduino Esplora

Arduino Ethernet (AVR+W5100)


Arduino Yún (AVR+AR9331)



Arduino Philosophy

  1. Free to modify and inspect.
  2. Making designs rather than talking about it.
  3. Open source hardware and software.
  4. Forums with lots of help.

Arduino Environment


Arduino can mean 3 things

  1. Physical piece of hardware.
  2. Programming environment.
  3. Community and philosophy.

Installing the Arduino IDE


To make it as easy as possible to get started with the Arduino, the Arduino developers have created a simple but useful integrated development environment (IDE). It runs on many different operating systems. Before you can create your first projects, you have to install it.

Click here to download the Arduino IDE 👈

 



Sketch


A sketch is a program written with the Arduino IDE.[59] Sketches are saved on the development computer as text files with the file extension. ino. Arduino Software (IDE) pre-1.0 saved sketches with the extension. pde.

A minimal Arduino C/C++ program consists of only two functions:


setup (): This function is called once when a sketch starts after power-up or reset. It is used to initialize variables, input and output pin modes, and other libraries needed in the sketch. It is analogous to the function main ()


loop (): After setup () function exits (ends), the loop() function is executed repeatedly in the main program. It controls the board until the board is powered off or is reset. It is analogous to the function while (1)


Baud Rate:


The baud rate is the rate at which information is transferred in a communication channel. Baud rate is commonly used when discussing electronics that use serial communication. In the serial port context, "9600 baud" means that the serial port is capable of transferring a maximum of 9600 bits per second.

The signal includes:

  1. Protocol overhead (e.g. start bits, stop bits, and parity bits) and
  2. Actual application specific data

In Arduino, you can use 300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 28800, 38400, 57600, or 115200. However, 9600 is the standard baud rate usually used. Looking at the last number you may think 115200 must be the highest baud rate, NO NOT!

You can achieve more than that! Look at the datasheet of ATmega328P below!


The ATmega328P uses a hardware divisor from it's clock-rate to generate the base-clock for the serial interface. If there is no integer ratio from the main clock to the bit-time of the desired baud rate, the MCU will not be able to exactly produce the desired rate. This can lead to potential issues, as some devices are much more sensitive to baud-rate mismatch than others.

FTDI-based interfaces are quite tolerant of baud-rate mismatch, up to several percent error. General serial interfaces are tolerant of ~5% baud-rate error. However, since each end can be off, a more common spec is +-2.5%. This way, if one end is 2.5% fast, and the other is 2.5% slow, your overall error is still only 5%.

 

The UNO uses an ATmega328P as the primary MCU, and a ATmega16U2 as the USB-serial interface. We're also fortunate here in that both these MCUs use similar hardware USARTs, and 16 MHz clocks. Since both MCUs have the same hardware and clock-rate, they'll both have the same baud-rate error in the same direction, so we can functionally ignore the baud error issue.

So, it appears (according to data sheet) the hardware can run at 2,000,000 baud without problems. You can test this by writing a code.

IMP: Here I have used Arduino UNO as the example as it is widely used.


Languages supported by Arduino:


The Arduino IDE mainly supports C and C++, using special rules of code structuring. The Arduino IDE supplies a software library from the wiring project, which provides many common input and output procedures. Other than this Arduino IDE supports other languages also.

Some of the important languages are given below

  1. C
  2. C++
  3. Java
  4. Python
  5. Sql
  6. MQttl.Etc. 
Boards supported by Arduino IDE:

Other than the official boards of Arduino, the Arduino IDE also supports other boards also.
As the Arduino IDE is an open source software. Some of them are given below:
  1. DAQduino
  2. Cortina
  3. Cypress PSoC 4 Pioneer Kit (CY8CKIT-042)
  4. Ardweeny
  5. SAM15x15
  6. Digispark. Etc. 
Application:

  1.  Arduboy, a handheld game console based on Arduino.
  2.  XOD, a visual programming language for Arduino.
  3. Data loggers for scientific research. Etc.

 







 







Post a Comment

3 Comments

reddevil said…
Useful information
Amith K Jain said…
Useful information written in crisp manner