Arduino 2 - Programming Basics: Mr. Mcbrien Tej2O
Arduino 2 - Programming Basics: Mr. Mcbrien Tej2O
Arduino 2 - Programming Basics: Mr. Mcbrien Tej2O
Basics
Mr. McBrien
TEJ2O
Yesterday
Date
Name of Program
Allmajor subroutines must be labeled with some
words about their purpose.
A Programmer Tip
Expert Tip!
Sometimes you’ll want to disable some
code during testing/debugging.
No need to delete
Rightclick, “comment”
Whenyou’re ready to reinsert, rightclick,
“uncomment”
Using the Computer Screen
Why Work with the Screen?
The basic Arduino has a hard time communicating with users
You need to know what’s going on with your Arduino,
especially while you’re coding.
Many (most?) Arduino applications involve it being detached
from the computer, but you’ll usually have it plugged in
while you’re coding.
The serial print command allows you to communicate to the
user using the Serial Monitor
Play with the commands, and see what you can do.
Viewing the Serial Monitor
Accepting User Input
Later we will use this same idea to monitor for button pushes,
etc.
Activity 1
https://www.arduino.cc/en/Reference/pinMode
https://www.arduino.cc/en/reference/serial
https://
learn.adafruit.com/adafruit-arduino-lesson-5-the-serial-m
onitor/overview