P. 1
Arduino-Hardware and Software

Arduino-Hardware and Software

|Views: 1|Likes:
Published by Ar Ramya Prasad

More info:

Published by: Ar Ramya Prasad on Nov 05, 2012
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PPTX, PDF, TXT or read online from Scribd
See more
See less

12/04/2012

pdf

text

original

WHY MICROCONTROLLER IS ADDED IN THE CIRCUIT ?

1. PATH SELECTION 2. DECISION MAKING

3. SHARP TURNS

CIRCUIT DIAGRAM .

Connecting L293d:- .

SENSORS M M .

Mapping of pins in our Development Board:- .

VARIABLE DECLARATION . EG : int a.A BRIEF UP WITH THE SYNTAX : NAMING A PIN/PORT : #define variable name pin number EG: #define ledpin 13. float d=90. . INITIALIZATION : datatype variable name (=value).

// sets 'value' equal to the reading at the input pin digitalWrite(Pin / name .Reading Inputs & writing outputs Syntax value = digitalRead(Pin). // sets 'value' equal to the state specified at the output pin . HIGH/ LOW).

pinMode(pin. Syntax pinMode(pin.Pin Declaration To declare whether pin is input or output. // sets the 'pin' as output // sets the 'pin' as input . OUTPUT). INPUT).

DELAY SYNTAX : delay(time in ms). WHEN delay() IS USED IN ANY PROGRAM THEN THE STATEMENT JUST AFTER WHICH THE delay() FUNCTION IS USED IS EXECUTED FOR THAT MUCH TIME. AN IMPORTANT POINT IS THAT THE PROGRAM IS JUST HALTED FOR THE DEFINED DELAY TIME AT THE PREVIOUS STATEMENT EXECUTION. .

println(variable). WE CAN CONTINUOUSLY READ THE ANALOG/DIGITAL I/P or O/P VALUES Y DISPLAYING THEM ON THE SERIAL MONITOR. 2. SYNTAX : Serial. Serial. NO LCD NEEDED EXTERNALLY.print(variable).SERIAL MONITOR 1. 3. .

if-else() . } EXAMPLE : if(digitalRead(5)== 1) { digitalWrite(ledpin . } .FUNCTIONS . do while() . while() . HIGH). switch case etc LOOPING STATEMENTS if(condition) { statements.

} EXAMPLE: while( digitalRed(5)) { digitalWrite(ledpin . HIGH).While() while(condition) { statements. } .

} . case 1: digitalWrite(4 . default: break. break. } EXAMPLE : switch (a) { case 0: digitalWrite(2 .SWITCH CASE() switch(case) { case 0: statement . HIGH) break. HIGH) break. break. case 1: statement . default : break.

.WHAT IS A COMPILER ? A COMPILER IS A COMPUER PROGRAM THAT TRANSLATES SOURCE CODE FROM A HIGH LEVEL PROGRAMMING LANGUAGE TO A LOWER LEVEL LANGUAGE .

A Compiler thus helps the processor to understand our code.Conversion of the code (high level language) to language understandable by the computer/microcontroller (machine language) . .

.write(address. .i.EEPROM TYPES OF MEMORY FLASH EEPROM PROM THE DATA STORED IN THE EEPROM IS NOT LOST EVEN WHEN OTHER DATA IS FED INTO THE MICROCONTROLLER .read(address).e. EEPROM. value). IT IS NOT OVERWRITTEN . SYNTAX: EEPROM.

www.arduino.cc .

*Pulkit Hanswal-7415109966 *Ojaswi Dale-9039390088 *Deepika Gupta-8989875254 *Deepak-9669787936 .

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->