0% found this document useful (0 votes)
19 views23 pages

Arduino Microcontroller Basics Guide

Uploaded by

Hemant Homkar
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views23 pages

Arduino Microcontroller Basics Guide

Uploaded by

Hemant Homkar
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd

Arduino Part 1

Topics:
Microcontrollers
Programming Basics: structure and
variables
Digital Output
Analog to Digital Conversion
What is a Microcontroller

[Link]/chapters/view/1

• A small computer on a single chip


• containing a processor, memory, and input/output
• Typically "embedded" inside some device that they control
• A microcontroller is often small and low cost
• Examples
What is a Development Board
• A printed circuit
board designed to
facilitate work with a
particular
microcontroller.
• Typical components include:
• power circuit
• programming interface
• basic input; usually buttons and LEDs
• I/O pins
The Arduino Development Board

[Link]
The Arduino Microcontroller: Atmel
ARV Atmega 328

Specification
[Link]
What is the Arduino

[Link]/blog/bionicarduino
Getting Started
• Check out: [Link]
1. Download & install the Arduino environment (IDE)
2. Connect the board to your computer via the UBS cable
3. If needed, install the drivers (not needed in lab)
4. Launch the Arduino IDE
5. Select your board
6. Select your serial port
7. Open the blink example
8. Upload the program
Try It: Connect the USB Cable

[Link]/blog/bionicarduino
Arduino IDE

See: [Link] for more information


Select Serial Port and Board
Status Messages

[Link]/blog/bionicarduino
[Link]/blog/bionicarduino
Add an External LED to pin 13

• File > Examples > Digital > Blink


• LED’s have polarity
– Negative indicated by flat side of the housing
and a short leg

[Link]
A Little Bit About Programming
• Code is case
sensitive
• Statements are
commands and
must end with a
semi-colon
• Comments follow
a // or begin with /*
and end with */
• loop and setup
Our First Program
Terminology
Digital I/0

[Link]/chapters/view/1

pinMode(pin, mode)
Sets pin to either INPUT or OUTPUT
digitalRead(pin)
Reads HIGH or LOW from a pin
digitalWrite(pin, value)
Writes HIGH or LOW to a pin
Electronic stuff
Output pins can provide 40 mA of current
Writing HIGH to an input pin installs a 20KΩ pullup
Arduino Timing

• delay(ms)
– Pauses for a few milliseconds
• delayMicroseconds(us)
– Pauses for a few microseconds
• More commands:
[Link]/en/Reference/HomePage
Digital? Analog?
• Digital has two values: on and off
• Analog has many (infinite) values
• Computers don’t really do analog, they quantize
• Remember the 6 analog input pins---here’s how
they work

[Link]/blog/bionicarduino
Bits and Bytes
Variables

[Link]
Putting It Together
• Complete the sketch
(program) below.
• What output will be
generated by this program?
• What if the schematic were
changed? 

[Link]/learn/arduino
Good References
[Link]
[Link]/learn/arduino
[Link]

You might also like