Mechatronics: Arduino Board Description
Mechatronics: Arduino Board Description
Module 2
Arduino Board Description
by
Mr. CH.RAJENDRA PRASAD
Assistant Professor
Department of Electronics and Communication Engineering
Index
Bread board Connections
Arduino Board Description
Arduino Uno
Arduino Mega 2560
Module Learning Outcomes
construct prototype circuits with a breadboard
Explain Arduino boards (UNO & MEGA) and basic components.
Experiment with Arduino environment (Arduino programming language
and IDE)
Topic Learning Outcomes
S. No. TLO CO BL
Addressed
1 Describe mechatronic system using key elements CO1 L2
2 Identify real time mechatronics systems CO1 L3
3 Explain Arduino boards (UNO & MEGA) and basic CO5 L2
components
4 Develop prototype circuits and connect them to the CO6 L3
Arduino
5 Design low level Smart systems applications CO6 L6
Bread board Connections
Breadboards conduct along the lines
The long lines are usually used for the voltage
source (+) and (-)
ACTIVITY
Connect these circuits on the bread board
VCC 220 ohm VCC
VCC 220 ohm
220 ohm
220 ohm
220 ohm
220 ohm
220 ohm 220 ohm
220 ohm
220 ohm
220 ohm
Assessment Process:
Structure
Functions
Functions allow structuring the programs in segments of code
to perform individual tasks.
Advantages of functions:
codify one action in one place and debugged once
Parameters:
Returns: Nothing
digitalWrite( ):
Write a HIGH or a LOW value to a digital pin
Parameters:
Returns: Nothing
digitalRead( ):
Reads the value from a specified digital pin,
either HIGH or LOW
Syntax: digitalRead(pin)
Parameters:
Syntax: analogRead(pin)
Parameters:
Parameters:
Returns: Nothing
Example Code
Timer functions
Delay( ):
Pauses the program for the amount of time (in
milliseconds) specified as parameter.
Syntax: delay(ms)
Parameters:
Returns: Nothing
delayMicroseconds( ):
Pauses the program for the amount of time (in
microseconds) specified as parameter.
Syntax: delayMicroseconds(us)
Parameters:
Returns: Nothing
Serial I/O functions
Serial.begin( ):
Sets the data rate in bits per second (baud) for serial data
transmission.
Syntax: Serial.begin(speed)
Parameters:
Returns: Nothing
Serial.print( ):
Prints data to the serial port as human-readable ASCII
text.
Syntax: Serial.print(val)
Parameters:
Returns: Nothing
Serial.println( ):
Prints data to the serial port followed by a carriage return.
Syntax: Serial.println(val)
Parameters:
val: the value to print - any data type
Returns: Nothing
Review Questions
Which of the following function runs only once [ ]
a. delay() b. setup() c. delayVal() d. loop()
In Arduino Mega 2560, analog output pins are of _bit resolution [ ]
(a) 10 (b) 8 (c) 16 (d) 14
Arduino Mega 2560 operating voltage is _____________ [ ]
(a) 10V (b) 15V (c) 5V (d) 12V
Operating frequency of ATMega 2560 is [ ]
(a) 16 KHz (b) 16 MHz (c) 16GHz (d) 16THz
Arduino Mega 2560 has ________numbers of analog inputs [ ]
(a) 10 (b) 8 (c) 16 (d) 14
Review Questions Cntd.
________Function is used to configure the digital pins of
arduino.
Assessment Process:
Question TLO Addressed CO Addressed
1- 10 TLO 3 CO 5
THANK YOU
Questions…..?