First Step To Learn Robotics - ARDUINO MICRO CONTROLLER
Hi to Arduino robot makers. Today I’m
going to share with you about the arduino platform using ARDUINO MEGA 2560
development board. I have
selected the MEGA, because it has more pins. You can choose any arduino
compatible board. Here is my board.. It is a cheapest clone from this model I
think.It cost me about 16 dollars.
Are you a beginner to electronics?
It's not a problem for this start.Actually it is not need to know anything
about this platform before you start. At start I'm also like you.Only thing you
need is the thirst for electronics. If you know C language, it will help you to
program this board. But it is not a must.Must is unique ideas for new
programs.Share each other what you learn.
Here is small description about
this platform.The Arduino Mega 2560 is a microcontroller board based on the
chip ATmega2560 .It has 54 digital input output pins (of which 14 can be used
as PWM outputs), 16 analog inputs, 4 UARTs (hardware serial ports), a 16 MHz
crystal oscillator, a USB connection, a power jack, an ICSP header, and a reset
button. It contains everything needed to support the microcontroller; simply
connect it to the laptop with a USB cable to power it and for programming or
power it with a AC-to-DC adapter or battery to get started. Its input voltage
should be 6 to 20 volts. Recommended is 7 to 12 volts. Maximum DC current from
input output pin is 40 mille ampere .
Technical Specifications
Microcontroller -
ATmega2560
Operating Voltage - 5V
Input Voltage
(recommended)- 7-12V
Input Voltage
(limits)- 6-20V
Digital I / O Pins - 54
(of which 14 provide PWM output)
Analog Input Pins - 16
DC Current per I / O Pin - 40
mA
DC Current for 3.3V Pin - 50
mA
Flash Memory - 256 KB of
which 4 KB used by bootloader
SRAM - 8 KB
EEPROM - 4 KB
Clock Speed - 16MHz
CONNECTING THE MEGA 2560 TO
PC
Ok, let’s see how to start. First
download the arduino IDE through the <<link>> because
you should install the drivers for the arduino board. Then extract the
downloaded file using WINRAR. Then connect the board to the laptop using usb
cable.
Then
Xp users right click on MY COMPUTER icon and go to properties and then HARDWARE
after that device manager and PORTS. Now you can see your name of the Arduino
board With YELLOW MARK.
Then
right click on the board NAME and select UPDATE DRIVER.
After,
select YES,THIS TIME ONLY and then select
ADVANCED then select BROWS and select the Drivers folder in the arduino ide
extracted file.After installing the drivers correctly ,the YELLOW MARK
disappears.
In WIN 7 go to DEVICE MANAGER and do the same thing
Upload The Code To The Arduino Mega 2560
Now open the Arduino IDE. While the board is connected go to tools
and then board and select your board.Then go to TOOLS and select your SERIAL
PORT.
Ok. Now lets try to Upload a simple LED blinking program to the
board. It is easy because its is open source. First go to FILE, then EXAMPLES,
then BASICS and select BLINK.
/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.
This example code is in the public domain.
*/
// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
int led = 13;
// the setup routine runs once when you press reset:
void setup() {
// initialize the digital pin as an output.
pinMode(led, OUTPUT);
}
// the loop routine runs over and over again forever:
void loop() {
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
Blink
Turns on an LED on for one second, then off for one second, repeatedly.
This example code is in the public domain.
*/
// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
int led = 13;
// the setup routine runs once when you press reset:
void setup() {
// initialize the digital pin as an output.
pinMode(led, OUTPUT);
}
// the loop routine runs over and over again forever:
void loop() {
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
Now you have the Arduino software. If you like, buy a arduino mega
or Arduino UNO is also ok.UNO is is cheaper than MEGA.About 8 - 12 dollars.
Thats all for today.Share each other if you learn something.