Upload
gaurav-handa
View
45
Download
3
Tags:
Embed Size (px)
DESCRIPTION
ARDUINO
Citation preview
R O B O M A R T A R D U I N O B O A R D M A N U A L
Page 1
USER MANUAL FOR ROBOMART
ARDUINO BOARD
--------------------------------------------------------------------------------------------------------------------
Note: This tutorial is for the novice user. It shows how to use Robomart Arduino Board and explains
the working on open source Arduino software. Please refer to the documentation procedure described
here as followed.
------------------------------------------------------------------------------------------------------------------------------
R O B O M A R T A R D U I N O B O A R D M A N U A L
Page 2
Table of Contents 1. Introduction to Robomart Arduino Board ...................................................................... 3
1.1. Overview ............................................................................................................................ 3
1.2. Why use Arduino? ............................................................................................................. 3
1.3. What can we do with Arduino? ......................................................................................... 4
1.4. Robomart Arduino Board ............................................................................................... 5
1.5. Introduction to ATmega8 C ............................................................................................. 6
2. Block Diagram of Robomart Arduino Board .................................................................... 8
3. Components description of Robomart Arduino Board ..................................................... 9
4. Arduino Development Environment ............................................................................... 10
5. Introduction to Arduino Programming ............................................................................ 11
6. Compilation of your first program ................................................................................... 12
7. Uploading Program on Arduino Board ............................................................................ 13
8. Study of some Arduino program using Loops and variables on Robomart Arduino
Board ......................................................................................................................................... 17
R O B O M A R T A R D U I N O B O A R D M A N U A L
Page 3
1. Introduction to Robomart Arduino Board
1.1. Overview Arduino is a tool for making computers that can sense and control more of the physical
world than your desktop computer. It's an open-source physical computing platform
based on a simple microcontroller board, and a development environment for writing
software for the board.
It has a Separate Software Development Environment, which is also an integrated
development environment (IDE). Arduino is an open source means you are free to
modify the hardware or software of the Arduino boards according to the requirements.
For software, you can add AVR-C library and start writing code as in AVR studio.
Arduino consist of digital and analog I/O pins that can be interfaced to various extension
boards and other circuits. The boards feature serial communications interfaces, including
USB on some models, for loading programs from personal computers. The Arduino IDE
uses a simplified version of C++, making it easier to learn to program. Finally, Arduino
provides a standard form factor that breaks out the functions of the micro-controller into
a more accessible package. Arduino can interact with buttons, LEDs, motors, speakers,
GPS units, cameras, the internet, and even your smart-phone or your TV.
1.2. Why use Arduino? There are many other microcontrollers and microcontroller platforms available for
physical computing. BX-24, Phidgets, MIT's Handyboard, and many others offer
similar functionality.
All of these tools take the messy details of microcontroller programming and wrap it up
in an easy-to-use package.
Arduino also simplifies the process of working with microcontrollers, but it offers some advantage for teachers, students, and interested amateurs over other systems:
Inexpensive - Arduino boards are relatively inexpensive compared to other microcontroller platforms. The least expensive version of the Arduino module can be
assembled by hand, and even the pre-assembled.
Cross-platform - The Arduino software runs on Windows, Macintosh OSX, and Linux operating systems. Most microcontroller systems are limited to Windows.
Simple, clear programming environment - The Arduino programming environment is easy-to-use for beginners, yet flexible enough for advanced users to
take advantage of as well.
R O B O M A R T A R D U I N O B O A R D M A N U A L
Page 4
Open source and extensible software - The Arduino is based on Atmel's AVR series. The Arduino software is an open source tools, available for extension by
experienced programmers. The language can be expanded through C++ libraries.
1.3.What can we do with Arduino? Arduino is a great tool for developing interactive objects, taking inputs from a variety
of switches or sensors and controlling a variety of lights, motors and other outputs.
Arduino projects can be stand-alone or they can be connected to a computer using USB.
The Arduino will be seen by the computer as a standard serial interface. There is serial
communication APIs on most programming languages so interfacing Arduino with a
software program running on the computer should be pretty straight forward. The
Arduino board is a microcontroller board, which is a small circuit that contains a whole
computer on a small chip (the microcontroller).
There are different versions of the Arduino board.
Arduino can be used to develop interactive objects, taking inputs from a variety of
switches or sensors, and controlling a variety of lights, motors, and other physical
outputs. Arduino projects can be stand-alone, or they can communicate with software
running on your computer (e.g. Flash, Processing, MaxMSP.)
R O B O M A R T A R D U I N O B O A R D M A N U A L
Page 5
1.3. Robomart Arduino Board
R O B O M A R T A R D U I N O B O A R D M A N U A L
Page 6
1.4. Introduction to ATmega8 C
1.4.1. Overview
The ATmega8 is a low power CMOS 8-Bit Microcontroller based on AVR Enhanced
RISC Architecture. By executing powerful Instruction in a single clock cycle, ATmega8
achieves throughputs approaching 1 MIPS per MHz allowing the designer to optimize
power consumption versus processing speed.
1.4.2.Pin Mapping of Atmega 8 with Robomart Arduino
R O B O M A R T A R D U I N O B O A R D M A N U A L
Page 7
1.4.3. Pin Descriptions
VCC: Digital supply voltage.
GND: Ground.
Port B (PB7-PB0): Port B is an 8-bit bi-directional I/O port with internal pull-up
resistors. The Port B output buffers have symmetrical drive characteristics with both
high sink and source capability. As inputs, Port B pins that are externally pulled low will
source current if the pull-up resistors are activated. The Port B pins are tri-stated when a
reset condition becomes active, even if the clock is not running. Port B also serves the
functions of various special features of the ATmega8.
Port C (PC7-PC0): Port C is an 8-bit bi-directional I/O port with internal pull-up
resistors. The Port C output buffers have symmetrical drive characteristics with both
high sink and source capability. As inputs, Port C pins that are externally pulled low will
source current if the pull-up resistors are activated. The Port C pins are tri-stated when a
reset condition becomes active, even if the clock is not running. If the JTAG interface is
enabled, the pull-up resistors on pins PC5 (TDI), PC3 (TMS) and PC2 (TCK) will be
activated even if a reset occurs.
Port D (PD7-PD0): Port D is an 8-bit bi-directional I/O port with internal pull-up
resistors. The Port D output buffers have symmetrical drive characteristics with both
high sink and source capability. As inputs, Port D pins that are externally pulled low will
source current if the pull-up resistors are activated. The Port D pins are tri-stated when a
reset condition becomes active, even if the clock is not running. Port D also serves the
functions of various special features of the ATmega8.
RESET: Reset Input. A low level on this pin for longer than the minimum pulse length
will generate a reset, even if the clock is not running. Shorter pulses are not guaranteed
to generate a reset.
XTAL1: Input to the inverting Oscillator amplifier and input to the internal clock
operating circuit.
XTAL2: Output from the inverting Oscillator amplifier.
AVCC: AVCC is the supply voltage pin for Port A and the A/D Converter. It should be
R O B O M A R T A R D U I N O B O A R D M A N U A L
Page 8
externally connected to VCC, even if the ADC is not used.
AREF: AREF is the analog reference pin for the A/D Converter
2. Block Diagram of Robomart Arduino Board
R O B O M A R T A R D U I N O B O A R D M A N U A L
Page 9
3. Components description of Robomart Arduino
Board
R O B O M A R T A R D U I N O B O A R D M A N U A L
Page 10
4. Arduino Development Environment The Arduino development environment contains a text editor for writing code, a
message area, a text console, a toolbar with buttons for common functions, and a series
of menus. It connects to the Arduino hardware to upload programs and communicate
with them.
Writing Sketches:- Software written using Arduino is called sketch. These sketches are written in the text
editor. Sketches are saved with the file extension .ino. It has features for cutting/pasting
and for searching/replacing text. The message area gives feedback while saving and
exporting and also displays errors. The console displays text output by the Arduino
environment including complete error messages and other information. The bottom right
hand corner of the window displays the current board and serial port. The toolbar
buttons allow you to verify and upload programs, create, open, and save sketches, and
open the serial monitor.
Verify :- Checks your code for errors
Upload: - Compiles your code and uploads it to the Arduino I/O board. See
uploading below for details
Note: - If you are using an external programmer, you can hold down the
"shift" key on your computer when using this icon. The text will change to
Upload using Programmer
New: - Creates a new sketch.
Open: - Presents a menu of all the sketches in your sketchbook. Clicking one
will open it within the current window.
Note: due to a bug in Java, this menu doesn't scroll; if you need to open a
sketch late in the list, use the File | Sketchbook menu instead.
Save: - Saves your sketch.
Serial Monitor: - Opens the serial Monitor.
R O B O M A R T A R D U I N O B O A R D M A N U A L
Page 11
5. Introduction to Arduino Programming
Writing your first program
/***************************your first ARDUINO Project**************************/
Void setup()
{
// Initialize the PORTs, Variables, etc here
}
Void loop()
{
// Write your code that gets continuously executed
}
/***********end of the program*************/
Write down the above code to your Arduino Text Editor. See Screen shot of the same below.
R O B O M A R T A R D U I N O B O A R D M A N U A L
Page 12
6. Compilation of your first program Press Verify button in tool bar to Compile your project and then press upload button to
dump the code in the microcontroller as shown in diagram.
R O B O M A R T A R D U I N O B O A R D M A N U A L
Page 13
7. Uploading Program on Arduino Board
Step 1: - Connect one end of your USB Cable with Computers USB Port and connect
other end with the Arduino board.
R O B O M A R T A R D U I N O B O A R D M A N U A L
Page 14
Step 2: - Click on to the button Serial Port which is shown in drop down menu
R O B O M A R T A R D U I N O B O A R D M A N U A L
Page 15
Step 3: - Browse your Board to be used. Here we are using Arduino
NG older w/ Atmega8.
R O B O M A R T A R D U I N O B O A R D M A N U A L
Page 16
Step 4: - Finally click on to the Upload button to burn the sketch file in the Arduino
Board.
R O B O M A R T A R D U I N O B O A R D M A N U A L
Page 17
8. Study of some Arduino program using Loops
and variables on Robomart Arduino Board Blinking LEDs Project
//Project name : Blinking LEDs
// Designed By : ROBOMART
// http://www.robomart.com
/* Program for Blinking LEDs" ___________________________________________________
int LED=13; //LED initialize as pin no.13.
void setup() // the setup routine runs once when you press reset.
{
pinMode(LED,OUTPUT); // initialize the digital pins as an output
}
void loop() // the loop routine runs over and over again forever.
{
digitalWrite(LED,HIGH); // turn the LED ON (HIGH is the voltage level).
delay(500); // wait for a second. digitalWrite(LED,LOW); // turn the LED OFF by making the voltage LOW delay(500); // wait for a second.
}
R O B O M A R T A R D U I N O B O A R D M A N U A L
Page 18
For any Query???
Technical : +91-8744000666
Other Queries: +91-8744000555
R O B O M A R T A R D U I N O B O A R D M A N U A L
Page 19
Thanks for purchasing Robomart
ARDUINO Board