Arduino Spooky Projects Class 3.pdf

(9023 KB) Pobierz
Spooky Projects
Introduction to Microcontrollers with Arduino
Class 3
21 Oct 2006 - machineproject - Tod E. Kurt
1307912648.006.png
What’s For Today
Controlling Arduino from a computer
Controlling a computer from Arduino
Servomotors
R,G,B LED color mixing
1307912648.007.png
Remove ProtoShield
First half of class, we don’t need it
And we want to observe the Arduino board
“Shields down, cap’n!”
1307912648.008.png
Recap: Programming
Edit
Compile
Reset
Upload
Remember: always start from a known working system
1307912648.009.png 1307912648.001.png 1307912648.002.png 1307912648.003.png 1307912648.004.png
Communicating
with Others
Arduino can use same USB cable for
programming and to talk with computers
Talking to other devices uses the “ Serial
commands
Serial.begin() – prepare to use serial
Serial.print() – send data to computer
Serial.read() – read data from computer
Can talk to not just computers.
Most things more complex than simple sensors/actuators speak serial.
1307912648.005.png
Zgłoś jeśli naruszono regulamin