CS247L January 21 Intro to Arduino - Stanford HCI Group · Arduino – Is an open source hardware...
Transcript of CS247L January 21 Intro to Arduino - Stanford HCI Group · Arduino – Is an open source hardware...
CS247L
January 21
Intro to Arduino
What is Arduino
Arduino – Is an open source hardware
platform for easily programming
microcontrollers aimed at artist, hobbyists,
and makers.
What is a Microcontroller
A microcontroller is a small, inexpensive computer,
usually used for sensing input from the real world and
controlling devices based on that input.
Most electronic devices you use today have a
microcontroller in them of some form or another.
Microcontrollers are easy to use with simple sensors
and output devices, and they can communicate with
desktop computers fairly simply as well.
Motivating Examples
!"#$%&'()"*+,'- .'-/-$"+-
Electricity as Water Analogy
V = IR
What’s In Your Kit?01234553+"$"#%67368/9/7,":5;+<*/=">/$?
1234553+"$"#%67368/9/7,":5@+'%<6"%+</=&
Getting Started0123455%+<*/="7,,5'=5A*/<'5B":'C%&'?
!D"=E$(F"+&'$(G1/-("
H%
I-/=&(%(@*2"=
H%
I-/=&(%(@*2"=
H%
H%9/=&()":'$1/=&(@#/=9
H%
H%9/=&()":'$1/=&(@#/=9
123455%+<*/="7,,5'=5*3#"%<-5G*$"+/%#5@*2"=7J3&
I-/=&(%(@*2"=
H%
I-/=&(%(@*2"=
I-/=&(%(C"$'=K":'$'+
I-/=&(%(C"$'=K":'$'+
Useful Links•;+<*/="(L(1234558887%+<*/="7,,
!"#$%&#'()*+#,(-$%.$*/(�".1%2"#3($4$".&%5'3(.*0*.*#6*3(7%'&6%558(*9*.8$:&#,(8"4
#**/($"(;#"<(%7"4$($:*(=./4&#"(>5%?".1@(().*%$(>5%6*($"('$%.$A
•C+"$"#%6(L(1234553+"$"#%67368/9/7,":
).*%$(.*'"4.6*(0".(>."$"$8>&#,($4$".&%5'@((-**($:*('*62"#3(B-$%#0"./(C."$"$8>&#,
D4$".&%5'E((0".(4'*045(�".1%2"#@
•(G":(M&"'E-(C1N-/,%#(O":3*K=&()/$'P(1234558887K&"'7='$53,":35/=<'Q7-1$:#
=(,.*%$(.*'"4.6*(0".(5*%.#&#,(%7"4$(>:8'&6%5(6"1>4$*.@((-6."55(/"<#($"(BD">&6'E@
F'*045('*62"#'(ʎ/*(BG%'&6(H5*6$.&6%5E3(BI&6."6"#$."55*.'E3(BJ#>4$(K(L4$>4$E3(%#/
BI"$".'(K(I*6:%#&6'E@
•(OO.H;(;##(;6"*$()'=-"+-(P(123455,:P8/9/7-$%=R"+<7'<*58/9/5)'=-"+-
M&;&(>%,*($:%$(>."9&/*'(6&.64&$(/&%,.%1'(/*$%&5&#,(:"<($"(:"";(4>(1%#8(/&N*.*#$
$8>*'("0('*#'".'(0."1(0".6*('*#'&#,(.*'&'$".'($"(/&'$%#6*('*#'".'3($"(>"$*#2"1*$*.'3
*$6
•(MGC()'=-"+(G*$"+/%#-(P(123455/$37=N*7'<*531N-,":35-'=-"+-5.'3"+$-5.'3"+$-
=(1".*(/*$%&5*/(>%,*("#(*9*.8(>"''&75*('*#'".(8"4(6"45/(&1%,&#*@(()"(:*.*(&0(8"4
%.*(5"";&#,(0".(1".*("4$5%#/&':('*#'".'@
•(STD(O%#,*#%$"+(P(123455#'<7#/='%+U7"+&5U#'<78/V
).*%$(>%,*(0".(6%5645%2#,($:*(.*'&'$%#6*(.*O4&.*/($"(5&,:$(%#(PHQ@((R"4(#**/($"
;#"<($:*(0".<%./(9"5$%,*(ST0U("0(8"4.(PHQ@
Where to Buy Stuff•)3%+9F*=(L(1234558887-3%+9R*=7,":
;(&+'%$(-/$'($%/#"+'<($"8%+<-('#',$+"=/,(1"66N/-$-(0#/9'(*-W?7((T%-N($"(-'%+,17((H"-$("R
$1'(/$':-($1'N(,%++N(%+'('%-N($"(*-'7((G1'N(1%X'(%(#"$("R($*$"+/%#-("=($1'/+(-/$'(%-
8'##7
•Y%:',"(L(1234558887J%:',"7,":
;(-#/&1$#N(#'--(*-'+(R+/'=<#N('#',$+"=/,-(-$"+'7((G1'(&""<(='8-(/-($1'N(%+'(#",%$'<(/=
)%=(O%+#"-(+/&1$("=(UZU7((@*$(6'8%+'[(/$(/-(="$(%(\-$"+'](81'+'(N"*(,%=(6+"8-'7((^"*
:*-$(_&*+'("*$($1'(/$':(=*:6'+-(R+":($1'/+("=#/='(,%$%#"&(%=<(_##("*$(%("+<'+7
^"*+(6'-$("3K"=(/-($"(J*-$("+<'+("=#/='(/R(N"*(,%=(8%/$("=($1'(-1/33/=&7
•D/&/9'N(L(1234558887</&/9'N7,":
D/&/9'N(,%++/'-(:"+'(-$*`($1%=(Y%:',"7((G1'NE+'(-1/33/=&(-3''<-(%+'(3+'2N(&""<[
%=<($1'NE+'(3+/,'-(%+'(X'+N(+'%-"=%6#'7((^"*(,%=("=#N("+<'+(R+":($1':("=#/='7
•(.%</")1%,9(L(1234558887+%</"-1%,97,":
;(&+'%$(3#%,'($"(&"(/R(N"*(=''<(-":'$1/=&(a*/,97((G1'N(,%++N(:%=N(6%-/,('#',$+"=/,
,":3"='=$-[(R+":(6*2"=-($"(-8/$,1'-($"(6%2'+N(3%,9-[(+'-/-$"+-[(,%3%,/$"+-[('$,7
TQ3',$($"(3%N(%(1/&1'+(3+/,'(R"+($1'(,"=X'=/'=,'7