Arduino and basic C review.pdf

(9639 KB) Pobierz
Arduino and basic C review
CPE 355 - Real Time Embedded Kernels - Spring ‘12
Nuno Alves (nalves@wne.edu), College of Engineering
1114154845.013.png
Course requirements
Arduino Uno R3 - $29.95
USB Cable A to B - $3
Access to a computer - Either Mac or PC is fine
Download free Arduino IDE from www.arduino.cc
CPE 355 - Real Time Embedded Kernels - Spring ‘12
Nuno Alves (nalves@wne.edu), College of Engineering
1114154845.014.png 1114154845.015.png 1114154845.016.png 1114154845.001.png 1114154845.002.png
Introduction to Arduino development
This topic is a very basic introduction to the Arduino
development and the prototype board.
This is so you can refresh your basic C programming skills.
In the process you will also become comfortable with the
Arduino prototype board.
In future classes we will be delving deeper into the architecture
of the ATMega so we can implement and study real time systems.
CPE 355 - Real Time Embedded Kernels - Spring ‘12
Nuno Alves (nalves@wne.edu), College of Engineering
1114154845.003.png 1114154845.004.png
Arduino
Pins
This is the prototype board we will be
using in our class.
Broadly speaking, any embedded
program can:
1.Turn ON/OFF pins.
2.Read data from pins.
CPE 355 - Real Time Embedded Kernels - Spring ‘12
Nuno Alves (nalves@wne.edu), College of Engineering
1114154845.005.png 1114154845.006.png 1114154845.007.png 1114154845.008.png 1114154845.009.png
Digital I/O
Digital I/O pins
Input/Output (I/O) is done through pins.
Input = read physical world data.
Output = write data to the physical world.
You insert a wire into a pin and connect it
to something else.
We can program a pin to be input OR
output.
Digital pins have two values: high (5 Volts)
or low (0 Volts).
CPE 355 - Real Time Embedded Kernels - Spring ‘12
Nuno Alves (nalves@wne.edu), College of Engineering
1114154845.010.png 1114154845.011.png 1114154845.012.png
Zgłoś jeśli naruszono regulamin