Sie sind auf Seite 1von 30

INTRODUCTION TO gizDuino

An Arduino Compatible Micro-controller


Platform
OBJECTIVES
AT THE END OF THIS MODULE, THE LEARNERS SHOULD BE
ABLE TO:
1. DEFINE THE MEANING OF MICROCONTROLLER
2. ENUMERATE THE DIFFERENT APPLICATIONS OF
MICROCONTROLLER
3. LEARN SOME REASONS FOR USING A
MICROCONTROLLER
4. EXECUTE THE FIRST PROGRAM (BLINK PROGRAM)

Microcontrollers & Robotics


OVERVIEW
Microcontroller (MCU) is a programmable
integrated circuit which can trigger or control
direct-current (DC) devices such as relay, light-
emitting diodes(LED), motors, sensors and
switches base on the program embedded to it.
Most common application of MCU are in the
field of robotics and automation.

Microcontrollers & Robotics


MICROCONTROLLER
BASICS
Microcontrollers & Robotics
Where are MCUs used?
used as dedicated controllers in:
o Home and office appliances
o Consumer & Personal electronics
o Medical equipment
o Industrial equipment
o Automotive electronics
o Naval/Avionics/Aerospace

Microcontrollers & Robotics


Why use a microcontroller?
Low-cost
Flexible
Small outline
Low-power

Microcontrollers & Robotics


Why use a microcontroller?
Low-cost
o Typical price range: P50 to P1000
Flexible
Small outline
Low-power

Microcontrollers & Robotics


Why use a microcontroller?
Cheap
Flexible
o Re-programmable
o High-integration devices
Small outline
Low-power

Microcontrollers & Robotics


Why use a microcontroller?
Cheap
Flexible
Small outline
o small physical size = low PCB footprint

Low-power

Microcontrollers & Robotics


Why use a microcontroller?
Cheap
Flexible
Small outline
Low-power
o Battery-operated application

Microcontrollers & Robotics


ARDUINO
MICROCONTROLLER
Microcontrollers & Robotics
What is an Arduino?
A microcontroller board + programming IDE
(Integrated Development Environment)

Microcontrollers & Robotics


What is an Arduino?
A complete MCU board
o ATMEGA microcontroller
o USB circuit
o Power supply circuit
o Reset button
o Female header connectors

Microcontrollers & Robotics


What is an Arduino?
Easy-to-use Arduino Development
environment
o Program is called Sketch
A simplified combination of C/C++ programming
language

Microcontrollers & Robotics


GIZDUINO
MICROCONTROLLER
AN ARDUINO CLONE MICROCONTROLLER

Microcontrollers & Robotics


Similarities between Arduino
Uno and Gizduino

Arduino Uno gizDuino

Microcontrollers & Robotics


BASIC ARDUINO PROGRAMMING
& INTERFACING

Microcontrollers & Robotics


BASIC ARDUINO PROGRAMMING
& Interfacing
What is an LED?
Light-emitting diode
o An electronic device that emit visible light
when activated.
o Typically used as electrical status indicators

Microcontrollers & Robotics


WARNING: It is essential that you always put a resistor in
series with the LED to ensure that the correct current gets to the LED.
You can permanently damage the LED if you fail to do this.
Exercise#1. LED Interfacing
Build an LED circuit
Interface the LED circuit to the
Gizduino board
Create a sketch that will turn on the
LED

Microcontrollers & Robotics


Exercise#1. LED Circuit

Circuit on breadboard
Microcontrollers & Robotics
Arduino Environment
Open the Arduino
programming
environment

Microcontrollers & Robotics


Take Note:
A sketch must have a setup() void setup()
and loop() function otherwise it
{
will not work. //initialize the digital pin 7 as
//an output.
The setup() function is run
pinMode(7, OUTPUT);
once and once only at the start
of the program and is where }
you will issue general void loop()
instructions such as setting up {
pin modes, serial baud rates digitalWrite(7, HIGH); // turn the
and etc. //LED on
delay(1000); // wait for a second
The loop() function is the main digitalWrite(7, LOW);// turn the LED
program function and runs //off
delay(1000); // wait for a second
continuously as long as the
Gizduino is turned on. }
IDE Basic functions are case
sensitive Microcontrollers & Robotics
Writing the Sketch
void setup()
{

void loop()
{

Microcontrollers & Robotics


Writing the Sketch
void setup()
{
pinMode(7, OUTPUT); //Pin 7 is output pin.
}

void loop()
{

Microcontrollers & Robotics


Writing the Sketch
void setup()
{
pinMode(7, OUTPUT); //Pin 7 is output pin.
}
void loop()
{
digitalWrite(7, HIGH); //LED is on.
delay(1000); //wait 1 second
digitalWrite(7, LOW); //LED is off
delay(1000); //wait 1 second
}

Microcontrollers & Robotics


Writing the Sketch
Click the Verify button

Microcontrollers & Robotics


References :
Introduction to gizDuino by Jdtatelectronics 2014
Arduino Starter Kit Manual by EarthShine Design 2010
Arduino Tips, Tricks and Techniques by Ladyada 2014
THANK YOU

Microcontrollers & Robotics