mirror of
https://github.com/esp8266/Arduino.git
synced 2025-08-15 19:22:45 +03:00
added toInt() function to WString
This commit is contained in:
@@ -0,0 +1,232 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - ASCIIchart </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><strong>Reference</strong> <a class='wikilink' href='index.html'>Language</a> (<a class='wikilink' href='Extended.html'>extended</a>) | <a class='wikilink' href='Libraries.html'>Libraries</a> | <a class='wikilink' href='Comparison.html'>Comparison</a> | <a class='wikilink' href='Changes.html'>Changes</a>
|
||||
</p>
|
||||
<p class='vspace'></p><h2>ASCII chart</h2>
|
||||
<p>The <a class='urllink' href='http://en.wikipedia.org/wiki/ASCII_chart' rel='nofollow'>ASCII</a> (American Standard Code for Information Interchange) encoding dates to the 1960's. It is the standard way that text is encoded numerically.
|
||||
</p>
|
||||
<p class='vspace'></p><p>Note that the first 32 characters (0-31) are non-printing characters, often called control characters. The more useful characters have been labeled.
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
<table width='80%' border='0' cellpadding='5' cellspacing='0'><tr><td width='20%' valign='top'>
|
||||
<pre>
|
||||
DEC Character
|
||||
Value
|
||||
|
||||
0 null
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9 tab
|
||||
10 line feed
|
||||
11
|
||||
12
|
||||
13 carriage return
|
||||
14
|
||||
15
|
||||
16
|
||||
17
|
||||
18
|
||||
19
|
||||
20
|
||||
21
|
||||
22
|
||||
23
|
||||
24
|
||||
25
|
||||
26
|
||||
27
|
||||
28
|
||||
29
|
||||
30
|
||||
31
|
||||
|
||||
|
||||
|
||||
</pre></td><td width='18%' valign='top'>
|
||||
<pre>
|
||||
DEC Character
|
||||
Value
|
||||
|
||||
32 space
|
||||
33 !
|
||||
34 "
|
||||
35 #
|
||||
36 $
|
||||
37 %
|
||||
38 &
|
||||
39 '
|
||||
40 (
|
||||
41 )
|
||||
42 *
|
||||
43 +
|
||||
44 ,
|
||||
45 -
|
||||
46 .
|
||||
47 /
|
||||
48 0
|
||||
49 1
|
||||
50 2
|
||||
51 3
|
||||
52 4
|
||||
53 5
|
||||
54 6
|
||||
55 7
|
||||
56 8
|
||||
57 9
|
||||
58 :
|
||||
59 ;
|
||||
60 <
|
||||
61 =
|
||||
62 >
|
||||
63 ?
|
||||
|
||||
|
||||
|
||||
</pre></td><td width='18%' valign='top'>
|
||||
<pre>
|
||||
DEC Character
|
||||
Value
|
||||
|
||||
64 @
|
||||
65 A
|
||||
66 B
|
||||
67 C
|
||||
68 D
|
||||
69 E
|
||||
70 F
|
||||
71 G
|
||||
72 H
|
||||
73 I
|
||||
74 J
|
||||
75 K
|
||||
76 L
|
||||
77 M
|
||||
78 N
|
||||
79 O
|
||||
80 P
|
||||
81 Q
|
||||
82 R
|
||||
83 S
|
||||
84 T
|
||||
85 U
|
||||
86 V
|
||||
87 W
|
||||
88 X
|
||||
89 Y
|
||||
90 Z
|
||||
91 [
|
||||
92 \
|
||||
93 ]
|
||||
94 ^
|
||||
95 _
|
||||
|
||||
|
||||
|
||||
</pre></td><td width='18%' valign='top'>
|
||||
<pre>
|
||||
DEC Character
|
||||
Value
|
||||
|
||||
96 `
|
||||
97 a
|
||||
98 b
|
||||
99 c
|
||||
100 d
|
||||
101 e
|
||||
102 f
|
||||
103 g
|
||||
104 h
|
||||
105 i
|
||||
106 j
|
||||
107 k
|
||||
108 l
|
||||
109 m
|
||||
110 n
|
||||
111 o
|
||||
112 p
|
||||
113 q
|
||||
114 r
|
||||
115 s
|
||||
116 t
|
||||
117 u
|
||||
118 v
|
||||
119 w
|
||||
120 x
|
||||
121 y
|
||||
122 z
|
||||
123 {
|
||||
124 |
|
||||
125 }
|
||||
126 ~
|
||||
127
|
||||
|
||||
</pre></td></tr></table>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='index.html'>Reference Home</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><em>Corrections, suggestions, and new documentation should be posted to the <a class='urllink' href='http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?board=swbugs' rel='nofollow'>Forum</a>.</em>
|
||||
</p>
|
||||
<p class='vspace'></p><p>The text of the Arduino reference is licensed under a
|
||||
<a class='urllink' href='http://creativecommons.org/licenses/by-sa/3.0/' rel='nofollow'>Creative Commons Attribution-ShareAlike 3.0 License</a>. Code samples in the reference are released into the public domain.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!--PageFooterFmt-->
|
@@ -0,0 +1,50 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - Abs </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
@@ -0,0 +1,67 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - AnalogRead </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><strong>Reference</strong> <a class='wikilink' href='index.html'>Language</a> | <a class='wikilink' href='Libraries.html'>Libraries</a> | <a class='wikilink' href='Comparison.html'>Comparison</a> | <a class='wikilink' href='Changes.html'>Changes</a>
|
||||
</p>
|
||||
<p class='vspace'></p><h2>analogRead()</h2>
|
||||
<h4>Description</h4>
|
||||
<p>Reads the value from the specified analog pin. The Arduino board contains a 6 channel (8 channels on the Mini and Nano, 16 on the Mega), 10-bit analog to digital converter. This means that it will map input voltages between 0 and 5 volts into integer values between 0 and 1023. This yields a resolution between readings of: 5 volts / 1024 units or, .0049 volts (4.9 mV) per unit. The input range and resolution can be changed using <a class='wikilink' href='AnalogReference.html'>analogReference</a>().
|
||||
</p>
|
||||
<p class='vspace'></p><p>It takes about 100 microseconds (0.0001 s) to read an analog input, so the maximum reading rate is about 10,000 times a second.
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Syntax</h4>
|
||||
<p>analogRead(pin)
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Parameters</h4>
|
||||
<p>pin: the number of the analog input pin to read from (0 to 5 on most boards, 0 to 7 on the Mini and Nano, 0 to 15 on the Mega)
|
@@ -0,0 +1,49 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - AnalogReference </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
@@ -0,0 +1,73 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - AnalogWrite </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><strong>Reference</strong> <a class='wikilink' href='index.html'>Language</a> | <a class='wikilink' href='Libraries.html'>Libraries</a> | <a class='wikilink' href='Comparison.html'>Comparison</a> | <a class='wikilink' href='Changes.html'>Changes</a>
|
||||
</p>
|
||||
<p class='vspace'></p><h2>analogWrite()</h2>
|
||||
<h4>Description</h4>
|
||||
<p>Writes an analog value (<a class='wikilink' href='http://arduino.cc/en/Tutorial/PWM'>PWM wave</a>) to a pin. Can be used to light a LED at varying brightnesses or drive a motor at various speeds. After a call to <strong>analogWrite()</strong>, the pin will generate a steady square wave of the specified duty cycle until the next call to <strong>analogWrite()</strong> (or a call to <strong>digitalRead()</strong> or <strong>digitalWrite()</strong> on the same pin). The frequency of the PWM signal is approximately 490 Hz.
|
||||
</p>
|
||||
<p class='vspace'></p><p>On most Arduino boards (those with the <span class='wikiword'>ATmega168</span> or <span class='wikiword'>ATmega328</span>), this function works on pins 3, 5, 6, 9, 10, and 11. On the Arduino Mega, it works on pins 2 through 13. Older Arduino boards with an <span class='wikiword'>ATmega8</span> only support analogWrite() on pins 9, 10, and 11. You do not need to call pinMode() to set the pin as an output before calling analogWrite().
|
||||
</p>
|
||||
<p class='vspace'></p><p>The <em>analogWrite</em> function has nothing whatsoever to do with the analog pins or the <em>analogRead</em> function.
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Syntax</h4>
|
||||
<p>analogWrite(pin, value)
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Parameters</h4>
|
||||
<p>pin: the pin to write to.
|
||||
</p>
|
||||
<p class='vspace'></p><p>value: the duty cycle: between 0 (always off) and 255 (always on).
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Returns</h4>
|
@@ -0,0 +1,61 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - Arithmetic </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><strong>Reference</strong> <a class='wikilink' href='index.html'>Language</a> | <a class='wikilink' href='Libraries.html'>Libraries</a> | <a class='wikilink' href='Comparison.html'>Comparison</a> | <a class='wikilink' href='Changes.html'>Changes</a>
|
||||
</p>
|
||||
<p class='vspace'></p><h2>Addition, Subtraction, Multiplication, & Division</h2>
|
||||
<h4>Description</h4>
|
||||
<p>These operators return the sum, difference, product, or quotient (respectively) of the two operands. The operation is conducted using the data type of the operands, so, for example, <code>9 / 4</code> gives <code>2</code> since 9 and 4 are ints. This also means that the operation can overflow if the result is larger than that which can be stored in the data type (e.g. adding 1 to an <a class='wikilink' href='Int.html'>int</a> with the value 32,767 gives -32,768). If the operands are of different types, the "larger" type is used for the calculation.
|
||||
</p>
|
||||
<p class='vspace'></p><p>If one of the numbers (operands) are of the type <strong>float</strong> or of type <strong>double</strong>, floating point math will be used for the calculation.
|
@@ -0,0 +1,80 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - Array </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><strong>Reference</strong> <a class='wikilink' href='index.html'>Language</a> | <a class='wikilink' href='Libraries.html'>Libraries</a> | <a class='wikilink' href='Comparison.html'>Comparison</a> | <a class='wikilink' href='Changes.html'>Changes</a>
|
||||
</p>
|
||||
<p class='vspace'></p><h2>Arrays</h2>
|
||||
<p>An array is a collection of variables that are accessed with an index number. Arrays in the C programming language, on which Arduino is based, can be complicated, but using simple arrays is relatively straightforward.
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Creating (Declaring) an Array</h4>
|
||||
<p>All of the methods below are valid ways to create (declare) an array.
|
||||
</p>
|
||||
<p class='vspace'></p><pre>
|
||||
int myInts[6];
|
||||
int myPins[] = {2, 4, 8, 3, 6};
|
||||
int mySensVals[6] = {2, 4, -8, 3, 2};
|
||||
char message[6] = "hello";
|
||||
|
||||
</pre>
|
||||
<p class='vspace'></p><p>You can declare an array without initializing it as in myInts.<br /><br />In myPins we declare an array without explicitly choosing a size. The compiler counts the elements and creates an array of the appropriate size.
|
||||
</p>
|
||||
<p class='vspace'></p><p>Finally you can both initialize and size your array, as in mySensVals. Note that when declaring an array of type char, one more element than your initialization is required, to hold the required null character.
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Accessing an Array</h4>
|
||||
<p>Arrays are <strong>zero indexed</strong>, that is, referring to the array initialization above, the first element of the array is at index 0, hence<br /><br /><code>mySensVals[0] == 2, mySensVals[1] == 4,</code> and so forth.
|
||||
</p>
|
||||
<p class='vspace'></p><p>It also means that in an array with ten elements, index nine is the last element. Hence:
|
||||
</p><pre>
|
||||
int myArray[10]={9,3,2,4,3,2,7,8,9,11};
|
||||
// myArray[9] contains 11
|
@@ -0,0 +1,47 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - Assignment </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
@@ -0,0 +1,76 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - AttachInterrupt </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><strong>Reference</strong> <a class='wikilink' href='index.html'>Language</a> | <a class='wikilink' href='Libraries.html'>Libraries</a> | <a class='wikilink' href='Comparison.html'>Comparison</a> | <a class='wikilink' href='Changes.html'>Changes</a>
|
||||
</p>
|
||||
<p class='vspace'></p><h2>attachInterrupt(interrupt, function, mode)</h2>
|
||||
<p class='vspace'></p><h4>Description</h4>
|
||||
<p>Specifies a function to call when an external interrupt occurs. Replaces any previous function that was attached to the interrupt. Most Arduino boards have two external interrupts: numbers 0 (on digital pin 2) and 1 (on digital pin 3). The Arduino Mega has an additional four: numbers 2 (pin 21), 3 (pin 20), 4 (pin 19), and 5 (pin 18).
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Parameters</h4>
|
||||
<p><strong>interrupt</strong>: the number of the interrupt (<em>int</em>)
|
||||
</p>
|
||||
<p class='vspace'></p><p><strong>function</strong>: the function to call when the interrupt occurs; this function must take no parameters and return nothing. This function is sometimes referred to as an <em>interrupt service routine.</em>
|
||||
</p>
|
||||
<p class='vspace'></p><p><strong>mode</strong> defines when the interrupt should be triggered. Four contstants are predefined as valid values:
|
||||
</p><ul><li><strong>LOW</strong> to trigger the interrupt whenever the pin is low,
|
||||
</li><li><strong>CHANGE</strong> to trigger the interrupt whenever the pin changes value
|
||||
</li><li><strong>RISING</strong> to trigger when the pin goes from low to high,
|
||||
</li><li><strong>FALLING</strong> for when the pin goes from high to low.
|
||||
</li></ul><p class='vspace'></p><h4>Returns</h4>
|
||||
<p>none
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Note</h4>
|
||||
<p><em>Inside the attached function, delay() won't work and the value returned by millis() will not increment. Serial data received while in the function may be lost. You should declare as volatile any variables that you modify within the attached function.</em>
|
||||
</p>
|
@@ -0,0 +1,85 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - BeginSerial </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc/">Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav">
|
||||
<p><a class='wikilink' href='Guide_index.html'>Guide</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='http://www.arduino.cc/en/Tutorial/HomePage'>Tutorials</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='index.html'>Reference</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='http://www.arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='http://www.arduino.cc/en/Main/Software'>Software</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='urllink' href='http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl' rel='nofollow'>Forum</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='urllink' href='http://www.arduino.cc/playground/' rel='nofollow'>Playground</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='urllink' href='http://www.arduino.cc/playground/Projects/ArduinoUsers' rel='nofollow'>Exhibition</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='http://www.arduino.cc/en/Hacking/HomePage'>Hacking</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='http://www.arduino.cc/en/Main/FAQ'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='http://www.arduino.cc/en/Main/Buy'>Buy</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><a class='wikilink' href='index.html'>Language</a> | <a class='wikilink' href='Libraries.html'>Libraries</a> | <a class='wikilink' href='Comparison.html'>Comparison</a>
|
||||
</p><h2>beginSerial(speed)</h2>
|
||||
<h4>Description</h4>
|
||||
<p>Initializes the serial port. Should be called from inside <a class='wikilink' href='Setup.html'>setup()</a>.
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Parameters</h4>
|
||||
<p>speed: the baud rate to use for the serial communication (e.g. 9600 or 19200)
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Returns</h4>
|
||||
<p>None
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Note</h4>
|
||||
<p>Serial Arduino boards supports speeds up to 19200 baud. USB boards support up to 115200 baud (with release 0003 and later of the Arduino software).
|
||||
</p>
|
||||
<p class='vspace'></p><h4>See also</h4>
|
||||
<ul><li><a class='wikilink' href='SerialAvailable.html'>serialAvailable</a>
|
||||
</li><li><a class='wikilink' href='SerialRead.html'>serialRead</a>
|
||||
</li><li><a class='wikilink' href='SerialWrite.html'>serialWrite</a>
|
||||
</li><li><a class='wikilink' href='PrintByte.html'>printByte</a>
|
||||
</li><li><a class='wikilink' href='PrintString.html'>printString</a>
|
||||
</li><li><a class='wikilink' href='PrintInteger.html'>printInteger</a>
|
||||
</li><li><a class='wikilink' href='PrintHex.html'>printHex</a>
|
||||
</li><li><a class='wikilink' href='PrintOctal.html'>printOctal</a>
|
||||
</li><li><a class='wikilink' href='PrintBinary.html'>printBinary</a>
|
||||
</li></ul><p class='vspace'></p><p><a class='wikilink' href='index.html'>Reference Home</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!--PageFooterFmt-->
|
@@ -0,0 +1,46 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - Bit </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
@@ -0,0 +1,48 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - BitClear </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
@@ -0,0 +1,48 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - BitRead </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
@@ -0,0 +1,48 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - BitSet </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
@@ -0,0 +1,50 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - BitWrite </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
@@ -0,0 +1,80 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - Bitshift </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><strong>Reference</strong> <a class='wikilink' href='index.html'>Language</a> | <a class='wikilink' href='Libraries.html'>Libraries</a> | <a class='wikilink' href='Comparison.html'>Comparison</a> | <a class='wikilink' href='Changes.html'>Changes</a>
|
||||
</p>
|
||||
<p class='vspace'></p><h2>bitshift left (<<), bitshift right (>>)</h2>
|
||||
<h4>Description</h4>
|
||||
<p>From <em>The Bitmath Tutorial</em> in The Playground
|
||||
</p>
|
||||
<p class='vspace'></p><p>There are two bit shift operators in C++: the left shift operator << and the right shift operator >>. These operators cause the bits in the left operand to be shifted left or right by the number of positions specified by the right operand.<br /><br />More on bitwise math may be found <a class='urllink' href='http://www.arduino.cc/playground/Code/BitMath' rel='nofollow'>here.</a>
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Syntax</h4>
|
||||
<p>variable << number_of_bits
|
||||
</p>
|
||||
<p class='vspace'></p><p>variable >> number_of_bits
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Parameters</h4>
|
||||
<p>variable - (byte, int, long)
|
||||
number_of_bits integer <= 32
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Example:</h4>
|
||||
<pre> int a = 5; // binary: 0000000000000101
|
||||
int b = a << 3; // binary: 0000000000101000, or 40 in decimal
|
||||
int c = b >> 3; // binary: 0000000000000101, or back to 5 like we started with
|
||||
</pre>
|
||||
<p class='vspace'></p><p>When you shift a value x by y bits (x << y), the leftmost y bits in x are lost, literally shifted out of existence:
|
||||
</p>
|
||||
<p class='vspace'></p><pre> int a = 5; // binary: 0000000000000101
|
||||
int b = a << 14; // binary: 0100000000000000 - the first 1 in 101 was discarded
|
@@ -0,0 +1,130 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - BitwiseAnd </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><strong>Reference</strong> <a class='wikilink' href='index.html'>Language</a> | <a class='wikilink' href='Libraries.html'>Libraries</a> | <a class='wikilink' href='Comparison.html'>Comparison</a> | <a class='wikilink' href='Changes.html'>Changes</a>
|
||||
</p>
|
||||
<p class='vspace'></p><h2>Bitwise AND (&), Bitwise OR (|), Bitwise XOR (^)</h2>
|
||||
<h4>Bitwise AND (&)</h4>
|
||||
<p>The bitwise operators perform their calculations at the bit level of variables. They help solve a wide range of common programming problems. Much of the material below is from an excellent tutorial on bitwise math wihch may be found <a class='urllink' href='http://www.arduino.cc/playground/Code/BitMath' rel='nofollow'>here.</a>
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Description and Syntax</h4>
|
||||
<p>Below are descriptions and syntax for all of the operators. Further details may be found in the referenced tutorial.
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Bitwise AND (&)</h4>
|
||||
<p>The bitwise AND operator in C++ is a single ampersand, &, used between two other integer expressions. Bitwise AND operates on each bit position of the surrounding expressions independently, according to this rule: if both input bits are 1, the resulting output is 1, otherwise the output is 0. Another way of expressing this is:
|
||||
</p>
|
||||
<p class='vspace'></p><pre> 0 0 1 1 operand1
|
||||
0 1 0 1 operand2
|
||||
----------
|
||||
0 0 0 1 (operand1 & operand2) - returned result
|
||||
</pre>
|
||||
<p class='vspace'></p><p>In Arduino, the type int is a 16-bit value, so using & between two int expressions causes 16 simultaneous AND operations to occur. In a code fragment like:
|
||||
</p>
|
||||
<p class='vspace'></p><pre> int a = 92; // in binary: 0000000001011100
|
||||
int b = 101; // in binary: 0000000001100101
|
||||
int c = a & b; // result: 0000000001000100, or 68 in decimal.
|
||||
</pre>
|
||||
<p class='vspace'></p><p>Each of the 16 bits in a and b are processed by using the bitwise AND, and all 16 resulting bits are stored in c, resulting in the value 01000100 in binary, which is 68 in decimal.
|
||||
</p>
|
||||
<p class='vspace'></p><p>One of the most common uses of bitwise AND is to select a particular bit (or bits) from an integer value, often called masking. See below for an example
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Bitwise OR (|)</h4>
|
||||
<p>The bitwise OR operator in C++ is the vertical bar symbol, |. Like the & operator, | operates independently each bit in its two surrounding integer expressions, but what it does is different (of course). The bitwise OR of two bits is 1 if either or both of the input bits is 1, otherwise it is 0. In other words:
|
||||
</p>
|
||||
<p class='vspace'></p><pre> 0 0 1 1 operand1
|
||||
0 1 0 1 operand2
|
||||
----------
|
||||
0 1 1 1 (operand1 | operand2) - returned result
|
||||
</pre>
|
||||
<p class='vspace'></p><p>Here is an example of the bitwise OR used in a snippet of C++ code:
|
||||
</p>
|
||||
<p class='vspace'></p><pre> int a = 92; // in binary: 0000000001011100
|
||||
int b = 101; // in binary: 0000000001100101
|
||||
int c = a | b; // result: 0000000001111101, or 125 in decimal.
|
||||
</pre>
|
||||
<p class='vspace'></p><h4>Example Program</h4>
|
||||
<p>A common job for the bitwise AND and OR operators is what programmers call Read-Modify-Write on a port. On microcontrollers, a port is an 8 bit number that represents something about the condition of the pins. Writing to a port controls all of the pins at once.
|
||||
</p>
|
||||
<p class='vspace'></p><p>PORTD is a built-in constant that refers to the output states of digital pins 0,1,2,3,4,5,6,7. If there is 1 in an bit position, then that pin is HIGH. (The pins already need to be set to outputs with the pinMode() command.) So if we write <code>PORTD = B00110001;</code> we have made pins 2,3 & 7 HIGH.
|
||||
One slight hitch here is that we <em>may</em> also have changeed the state of Pins 0 & 1, which are used by the Arduino for serial communications so we may have interfered with serial communication.
|
||||
</p>
|
||||
<p class='vspace'></p><pre> Our algorithm for the program is:
|
||||
</pre><ul><li>Get PORTD and clear out only the bits corresponding to the pins we wish to control (with bitwise AND).
|
||||
</li><li>Combine the modified PORTD value with the new value for the pins under control (with biwise OR).
|
||||
</li></ul><p class='vspace'></p><pre>int i; // counter variable
|
||||
int j;
|
||||
|
||||
void setup(){
|
||||
DDRD = DDRD | B11111100; // set direction bits for pins 2 to 7, leave 0 and 1 untouched (xx | 00 == xx)
|
||||
// same as pinMode(pin, OUTPUT) for pins 2 to 7
|
||||
Serial.begin(9600);
|
||||
}
|
||||
|
||||
void loop(){
|
||||
for (i=0; i<64; i++){
|
||||
|
||||
PORTD = PORTD & B00000011; // clear out bits 2 - 7, leave pins 0 and 1 untouched (xx & 11 == xx)
|
||||
j = (i << 2); // shift variable up to pins 2 - 7 - to avoid pins 0 and 1
|
||||
PORTD = PORTD | j; // combine the port information with the new information for LED pins
|
||||
Serial.println(PORTD, BIN); // debug to show masking
|
||||
delay(100);
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
<p class='vspace'></p><h4>Bitwise XOR (^)</h4>
|
||||
<p>There is a somewhat unusual operator in C++ called bitwise EXCLUSIVE OR, also known as bitwise XOR. (In English this is usually pronounced "eks-or".) The bitwise XOR operator is written using the caret symbol ^. This operator is very similar to the bitwise OR operator |, only it evaluates to 0 for a given bit position when both of the input bits for that position are 1:
|
||||
</p>
|
||||
<p class='vspace'></p><pre> 0 0 1 1 operand1
|
||||
0 1 0 1 operand2
|
||||
----------
|
@@ -0,0 +1,146 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - BitwiseCompound </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><strong>Reference</strong> <a class='wikilink' href='index.html'>Language</a> | <a class='wikilink' href='Libraries.html'>Libraries</a> | <a class='wikilink' href='Comparison.html'>Comparison</a> | <a class='wikilink' href='Changes.html'>Changes</a>
|
||||
</p>
|
||||
<p class='vspace'></p><h2>compound bitwise AND (&=), compound bitwise OR (|=)</h2>
|
||||
<p>The compound bitwise operators perform their calculations at the bit level of variables. They are often used to clear and set specific bits of a variable.
|
||||
</p>
|
||||
<p class='vspace'></p><p>See the <a class='wikilink' href='BitwiseAnd.html'>bitwise AND (&)</a> and <a class='wikilink' href='BitwiseAnd.html'>bitwise OR (|)</a> operators for the details of their operation, and also the <a class='urllink' href='http://www.arduino.cc/playground/Code/BitMath' rel='nofollow'>Bitmath Tutorial</a> for more information on bitwise operators.
|
||||
</p>
|
||||
<p class='vspace'></p><h2>compound bitwise AND (&=)</h2>
|
||||
<h4>Description </h4>
|
||||
<p>The compound bitwise AND operator (&=) is often used with a variable and a constant to force particular bits in a variable to the LOW state (to 0). This is often referred to in programming guides as "clearing" or "resetting" bits.
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Syntax:</h4>
|
||||
<pre>
|
||||
x &= y; // equivalent to x = x & y;
|
||||
</pre>
|
||||
<p class='vspace'></p><h4>Parameters</h4>
|
||||
<p>x: a char, int or long variable<br />y: an integer constant or char, int, or long
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Example:</h4>
|
||||
<p>First, a review of the Bitwise AND (&) operator
|
||||
</p><pre>
|
||||
0 0 1 1 operand1
|
||||
0 1 0 1 operand2
|
||||
----------
|
||||
0 0 0 1 (operand1 & operand2) - returned result
|
||||
|
||||
</pre>
|
||||
<p class='vspace'></p><p>Bits that are "bitwise <span class='wikiword'>ANDed</span>" with 0 are cleared to 0 so, if myByte is a byte variable,<br />
|
||||
<code>myByte & B00000000 = 0;</code>
|
||||
</p>
|
||||
<p class='vspace'></p><p>Bits that are "bitwise <span class='wikiword'>ANDed</span>" with 1 are unchanged so, <br />
|
||||
<code>myByte & B11111111 = myByte;</code>
|
||||
</p>
|
||||
<p class='vspace'></p><p>Note: because we are dealing with bits in a bitwise operator - it is convenient to use the binary formatter with <a class='wikilink' href='IntegerConstants.html'>constants.</a> The numbers are still the same value in other representations, they are just not as easy to understand. Also, B00000000 is shown for clarity, but zero in any number format is zero (hmmm something philosophical there?)
|
||||
</p>
|
||||
<p class='vspace'></p><p>Consequently - to clear (set to zero) bits 0 & 1 of a variable, while leaving the rest of the variable unchanged, use the compound bitwise AND operator (&=) with the constant B11111100
|
||||
</p><pre>
|
||||
1 0 1 0 1 0 1 0 variable
|
||||
1 1 1 1 1 1 0 0 mask
|
||||
----------------------
|
||||
1 0 1 0 1 0 0 0
|
||||
|
||||
variable unchanged
|
||||
bits cleared
|
||||
|
||||
</pre><p>Here is the same representation with the variable's bits replaced with the symbol x
|
||||
</p>
|
||||
<p class='vspace'></p><pre>
|
||||
x x x x x x x x variable
|
||||
1 1 1 1 1 1 0 0 mask
|
||||
----------------------
|
||||
x x x x x x 0 0
|
||||
|
||||
variable unchanged
|
||||
bits cleared
|
||||
|
||||
</pre><p>So if:
|
||||
</p><pre>
|
||||
myByte = 10101010;
|
||||
|
||||
myByte &= B1111100 == B10101000;
|
||||
</pre>
|
||||
<p class='vspace'></p><h2>compound bitwise OR (|=)</h2>
|
||||
<h4>Description </h4>
|
||||
<p>The compound bitwise OR operator (|=) is often used with a variable and a constant to "set" (set to 1) particular bits in a variable.
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Syntax:</h4>
|
||||
<pre>
|
||||
x |= y; // equivalent to x = x | y;
|
||||
</pre>
|
||||
<p class='vspace'></p><h4>Parameters</h4>
|
||||
<p>x: a char, int or long variable<br />y: an integer constant or char, int, or long
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Example:</h4>
|
||||
<p>First, a review of the Bitwise OR (|) operator
|
||||
</p><pre>
|
||||
0 0 1 1 operand1
|
||||
0 1 0 1 operand2
|
||||
----------
|
||||
0 1 1 1 (operand1 | operand2) - returned result
|
||||
|
||||
</pre><p>Bits that are "bitwise <span class='wikiword'>ORed</span>" with 0 are unchanged, so if myByte is a byte variable,<br />
|
||||
myByte | B00000000 = myByte;
|
||||
</p>
|
||||
<p class='vspace'></p><p>Bits that are "bitwise <span class='wikiword'>ORed</span>" with 1 are set to 1 so:<br />myByte & B11111111 = B11111111;
|
||||
</p>
|
||||
<p class='vspace'></p><p>Consequently - to set bits 0 & 1 of a variable, while leaving the rest of the variable unchanged, use the compound bitwise AND operator (&=) with the constant B00000011
|
||||
</p><pre>
|
||||
1 0 1 0 1 0 1 0 variable
|
||||
0 0 0 0 0 0 1 1 mask
|
||||
----------------------
|
||||
1 0 1 0 1 0 1 1
|
@@ -0,0 +1,45 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - BitwiseXorNot </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
@@ -0,0 +1,132 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - Board </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://www.arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://www.arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://www.arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://www.arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><strong>Reference</strong> <a class='wikilink' href='index.html'>Language</a> (<a class='wikilink' href='Extended.html'>extended</a>) | <a class='wikilink' href='Libraries.html'>Libraries</a> | <a class='wikilink' href='Comparison.html'>Comparison</a> | <a class='selflink' href='Board.html'>Board</a>
|
||||
</p>
|
||||
<p class='vspace'></p><h2>Introduction to the Arduino Board</h2>
|
||||
<p>Looking at the board from the top down, this is an outline of what you will see (parts of the board you might interact with in the course of normal use are highlighted):
|
||||
</p>
|
||||
<p class='vspace'></p><div><img src='http://www.arduino.cc/en/uploads/Reference/arduino_board.png' alt='' title='' /></div>
|
||||
<p class='vspace'></p><p>Starting clockwise from the top center:
|
||||
</p>
|
||||
<p class='vspace'></p><ul><li>Analog Reference pin (orange)
|
||||
</li><li>Digital Ground (light green)
|
||||
</li><li>Digital Pins 2-13 (green)
|
||||
</li><li>Digital Pins 0-1/Serial In/Out - TX/RX (dark green) - <em>These pins cannot be used for digital i/o (<strong>digitalRead</strong> and <strong>digitalWrite</strong>) if you are also using serial communication (e.g. <strong>Serial.begin</strong>)</em>.
|
||||
</li><li>Reset Button - S1 (dark blue)
|
||||
</li><li>In-circuit Serial Programmer (blue-green)
|
||||
</li><li>Analog In Pins 0-5 (light blue)
|
||||
</li><li>Power and Ground Pins (power: orange, grounds: light orange)
|
||||
</li><li>External Power Supply In (9-12VDC) - X1 (pink)
|
||||
</li><li>Toggles External Power and USB Power (place jumper on two pins closest to desired supply) - <span class='wikiword'>SV1</span> (purple)
|
||||
</li><li>USB (used for uploading sketches to the board and for serial communication between the board and the computer; can be used to power the board) (yellow)
|
||||
</li></ul><p class='vspace'></p><h3>Microcontrollers</h3>
|
||||
<table width='100%' border='0' cellpadding='5' cellspacing='0'><tr><td width='50%' valign='top'>
|
||||
<p class='vspace'></p><p><em><span class='wikiword'>ATmega168</span></em> (used on most Arduino boards)
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
<table border='0'><tr ><td align='left'>Digital I/O Pins</td><td align='left'>14 (of which 6 provide PWM output)</td></tr>
|
||||
<tr ><td align='left'>Analog Input Pins</td><td align='left'>6 (DIP) or 8 (SMD)</td></tr>
|
||||
<tr ><td align='left'>DC Current per I/O Pin</td><td align='left'>40 mA</td></tr>
|
||||
<tr ><td align='left'>Flash Memory</td><td align='left'>16 KB</td></tr>
|
||||
<tr ><td align='left'>SRAM</td><td align='left'>1 KB</td></tr>
|
||||
<tr ><td align='left'>EEPROM</td><td align='left'>512 bytes</td></tr>
|
||||
</table>
|
||||
<p class='vspace'></p><p>(<a class='urllink' href='http://www.atmel.com/dyn/resources/prod_documents/doc2545.pdf' rel='nofollow'>datasheet</a>)
|
||||
</p>
|
||||
<p class='vspace'></p></td><td width='50%' valign='top'>
|
||||
<p class='vspace'></p><p><em><span class='wikiword'>ATmega8</span></em> (used on some older board)
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
<table border='0'><tr ><td align='left'>Digital I/O Pins</td><td align='left'>14 (of which 3 provide PWM output)</td></tr>
|
||||
<tr ><td align='left'>Analog Input Pins</td><td align='left'>6</td></tr>
|
||||
<tr ><td align='left'>DC Current per I/O Pin</td><td align='left'>40 mA</td></tr>
|
||||
<tr ><td align='left'>Flash Memory</td><td align='left'>8 KB</td></tr>
|
||||
<tr ><td align='left'>SRAM</td><td align='left'>1 KB</td></tr>
|
||||
<tr ><td align='left'>EEPROM</td><td align='left'>512 bytes</td></tr>
|
||||
</table>
|
||||
<p class='vspace'></p><p>(<a class='urllink' href='http://www.atmel.com/dyn/resources/prod_documents/doc2486.pdf' rel='nofollow'>datasheet</a>)
|
||||
</p>
|
||||
<p class='vspace'></p></td></tr></table>
|
||||
<p class='vspace'></p><h3>Digital Pins</h3>
|
||||
<p>In addition to the specific functions listed below, the digital pins on an Arduino board can be used for general purpose input and output via the <a class='wikilink' href='PinMode.html'>pinMode()</a>, <a class='wikilink' href='DigitalRead.html'>digitalRead()</a>, and <a class='wikilink' href='DigitalWrite.html'>digitalWrite()</a> commands. Each pin has an internal pull-up resistor which can be turned on and off using digitalWrite() (w/ a value of HIGH or LOW, respectively) when the pin is configured as an input. The maximum current per pin is 40 mA.
|
||||
</p>
|
||||
<p class='vspace'></p><ul><li><strong>Serial: 0 (RX) and 1 (TX).</strong> Used to receive (RX) and transmit (TX) TTL serial data. On the Arduino Diecimila, these pins are connected to the corresponding pins of the FTDI USB-to-TTL Serial chip. On the Arduino BT, they are connected to the corresponding pins of the <span class='wikiword'>WT11</span> Bluetooth module. On the Arduino Mini and <span class='wikiword'>LilyPad</span> Arduino, they are intended for use with an external TTL serial module (e.g. the Mini-USB Adapter).
|
||||
<p class='vspace'></p></li><li><strong>External Interrupts: 2 and 3.</strong> These pins can be configured to trigger an interrupt on a low value, a rising or falling edge, or a change in value. See the <a class='wikilink' href='AttachInterrupt.html'>attachInterrupt()</a> function for details.
|
||||
<p class='vspace'></p></li><li><strong>PWM: 3, 5, 6, 9, 10, and 11.</strong> Provide 8-bit PWM output with the <a class='wikilink' href='AnalogWrite.html'>analogWrite()</a> function. On boards with an <span class='wikiword'>ATmega8</span>, PWM output is available only on pins 9, 10, and 11.
|
||||
<p class='vspace'></p></li><li><strong>BT Reset: 7.</strong> (Arduino BT-only) Connected to the reset line of the bluetooth module.
|
||||
<p class='vspace'></p></li><li><strong>SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK).</strong> These pins support SPI communication, which, although provided by the underlying hardware, is not currently included in the Arduino language.
|
||||
<p class='vspace'></p></li><li><strong>LED: 13.</strong> On the Diecimila and <span class='wikiword'>LilyPad</span>, there is a built-in LED connected to digital pin 13. When the pin is HIGH value, the LED is on, when the pin is LOW, it's off.
|
||||
</li></ul><p class='vspace'></p><h3>Analog Pins</h3>
|
||||
<p>In addition to the specific functions listed below, the analog input pins support 10-bit analog-to-digital conversion (ADC) using the <a class='wikilink' href='AnalogRead.html'>analogRead()</a> function. Most of the analog inputs can also be used as digital pins: analog input 0 as digital pin 14 through analog input 5 as digital pin 19. Analog inputs 6 and 7 (present on the Mini and BT) cannot be used as digital pins.
|
||||
</p>
|
||||
<p class='vspace'></p><ul><li><strong>I<sup>2</sup>C: 4 (SDA) and 5 (SCL).</strong> Support I<sup>2</sup>C (TWI) communication using the <a class='urllink' href='http://wiring.org.co/reference/libraries/Wire/index.html' rel='nofollow'>Wire library</a> (documentation on the Wiring website).
|
||||
</li></ul><p class='vspace'></p><h3>Power Pins</h3>
|
||||
<ul><li><strong>VIN</strong> (sometimes labelled "9V"). The input voltage to the Arduino board when it's using an external power source (as opposed to 5 volts from the USB connection or other regulated power source). You can supply voltage through this pin, or, if supplying voltage via the power jack, access it through this pin. Note that different boards accept different input voltages ranges, please see the <a class='urllink' href='http://www.arduino.cc/en/Main/Hardware' rel='nofollow'>documentation for your board</a>. Also note that the <span class='wikiword'>LilyPad</span> has no VIN pin and accepts only a regulated input.
|
||||
<p class='vspace'></p></li><li><strong>5V.</strong> The regulated power supply used to power the microcontroller and other components on the board. This can come either from VIN via an on-board regulator, or be supplied by USB or another regulated 5V supply.
|
||||
<p class='vspace'></p></li><li><strong>3V3.</strong> (Diecimila-only) A 3.3 volt supply generated by the on-board FTDI chip.
|
||||
<p class='vspace'></p></li><li><strong>GND.</strong> Ground pins.
|
||||
</li></ul><p class='vspace'></p><h3>Other Pins</h3>
|
||||
<ul><li><strong>AREF.</strong> Reference voltage for the analog inputs. Used with <a class='wikilink' href='AnalogReference.html'>analogReference</a>().
|
||||
<p class='vspace'></p></li><li><strong>Reset.</strong> (Diecimila-only) Bring this line LOW to reset the microcontroller. Typically used to add a reset button to shields which block the one on the board.
|
||||
</li></ul><p class='vspace'></p><p><a class='wikilink' href='index.html'>Reference Home</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><em>Corrections, suggestions, and new documentation should be posted to the <a class='urllink' href='http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?board=swbugs' rel='nofollow'>Forum</a>.</em>
|
||||
</p>
|
||||
<p class='vspace'></p><p>The text of the Arduino reference is licensed under a
|
||||
<a class='urllink' href='http://creativecommons.org/licenses/by-sa/3.0/' rel='nofollow'>Creative Commons Attribution-ShareAlike 3.0 License</a>. Code samples in the reference are released into the public domain.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!--PageFooterFmt-->
|
@@ -0,0 +1,72 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - Boolean </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><strong>Reference</strong> <a class='wikilink' href='index.html'>Language</a> | <a class='wikilink' href='Libraries.html'>Libraries</a> | <a class='wikilink' href='Comparison.html'>Comparison</a> | <a class='wikilink' href='Changes.html'>Changes</a>
|
||||
</p>
|
||||
<p class='vspace'></p><h1>Boolean Operators </h1>
|
||||
<p>These can be used inside the condition of an <a class='wikilink' href='If.html'>if</a> statement.
|
||||
</p>
|
||||
<p class='vspace'></p><h3>&& (logical and)</h3>
|
||||
<p>True only if both operands are true, e.g.
|
||||
</p><pre>
|
||||
if (digitalRead(2) == HIGH && digitalRead(3) == HIGH) { // read two switches
|
||||
// ...
|
||||
}
|
||||
</pre><p>is true only if both inputs are high.
|
||||
</p>
|
||||
<p class='vspace'></p><h3>|| (logical or)</h3>
|
||||
<p>True if either operand is true, e.g.
|
||||
</p><pre>
|
||||
if (x > 0 || y > 0) {
|
||||
// ...
|
@@ -0,0 +1,63 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - BooleanVariables </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><strong>Reference</strong> <a class='wikilink' href='index.html'>Language</a> | <a class='wikilink' href='Libraries.html'>Libraries</a> | <a class='wikilink' href='Comparison.html'>Comparison</a> | <a class='wikilink' href='Changes.html'>Changes</a>
|
||||
</p>
|
||||
<p class='vspace'></p><h2>boolean</h2>
|
||||
<p>A <strong>boolean</strong> holds one of two values, <a class='wikilink' href='Constants.html'>true</a> or <a class='wikilink' href='Constants.html'>false</a>. (Each boolean variable occupies one byte of memory.)
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Example</h4>
|
||||
<pre>
|
||||
int LEDpin = 5; // LED on pin 5
|
||||
int switchPin = 13; // momentary switch on 13, other side connected to ground
|
@@ -0,0 +1,80 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - Braces </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><strong>Reference</strong> <a class='wikilink' href='index.html'>Language</a> | <a class='wikilink' href='Libraries.html'>Libraries</a> | <a class='wikilink' href='Comparison.html'>Comparison</a> | <a class='wikilink' href='Changes.html'>Changes</a>
|
||||
</p>
|
||||
<p class='vspace'></p><h2>{} Curly Braces</h2>
|
||||
<p>Curly braces (also referred to as just "braces" or as "curly brackets") are a major part of the C programming language. They are used in several different constructs, outlined below, and this can sometimes be confusing for beginners.
|
||||
</p>
|
||||
<p class='vspace'></p><p>An opening curly brace "{" must always be followed by a closing curly brace "}". This is a condition that is often referred to as the braces being balanced. The Arduino IDE (integrated development environment) includes a convenient feature to check the balance of curly braces. Just select a brace, or even click the insertion point immediately following a brace, and its logical companion will be highlighted.
|
||||
</p>
|
||||
<p class='vspace'></p><p>At present this feature is slightly buggy as the IDE will often find (incorrectly) a brace in text that has been "commented out."
|
||||
</p>
|
||||
<p class='vspace'></p><p>Beginning programmers, and programmers coming to C from the BASIC language often find using braces confusing or daunting. After all, the same curly braces replace the RETURN statement in a subroutine (function), the ENDIF statement in a conditional and the NEXT statement in a FOR loop.
|
||||
</p>
|
||||
<p class='vspace'></p><p>Because the use of the curly brace is so varied, it is good programming practice to type the closing brace immediately after typing the opening brace when inserting a construct which requires curly braces. Then insert some carriage returns between your braces and begin inserting statements. Your braces, and your attitude, will never become unbalanced.
|
||||
</p>
|
||||
<p class='vspace'></p><p>Unbalanced braces can often lead to cryptic, impenetrable compiler errors that can sometimes be hard to track down in a large program. Because of their varied usages, braces are also incredibly important to the syntax of a program and moving a brace one or two lines will often dramatically affect the meaning of a program.
|
||||
</p>
|
||||
<p class='vspace'></p><h4><strong>The main uses of curly braces</strong></h4>
|
||||
<h4>Functions</h4>
|
||||
<pre> void myfunction(datatype argument){
|
||||
statements(s)
|
||||
}
|
||||
</pre>
|
||||
<p class='vspace'></p><h4>Loops</h4>
|
||||
<pre> while (boolean expression)
|
||||
{
|
||||
statement(s)
|
||||
}
|
@@ -0,0 +1,46 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - Break </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
@@ -0,0 +1,39 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - Byte </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
@@ -0,0 +1,43 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - ByteCast </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
@@ -0,0 +1,90 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - Cast </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://www.arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://www.arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://www.arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://www.arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><strong>Reference</strong> <a class='wikilink' href='index.html'>Language</a> (<a class='wikilink' href='Extended.html'>extended</a>) | <a class='wikilink' href='Libraries.html'>Libraries</a> | <a class='wikilink' href='Comparison.html'>Comparison</a> | <a class='wikilink' href='Board.html'>Board</a>
|
||||
</p>
|
||||
<p class='vspace'></p><h2>Cast</h2>
|
||||
<h4>Description</h4>
|
||||
<p>The cast operator translates one variable type into another and forces calculations to be performed in the cast type.
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Syntax</h4>
|
||||
<p>(type)variable
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Parameters:</h4>
|
||||
<p>type: any variable type (e.g. int, float, byte)
|
||||
</p>
|
||||
<p class='vspace'></p><p>variable: any variable or constant
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Example</h4>
|
||||
<pre>
|
||||
int i;
|
||||
float f;
|
||||
|
||||
f = 3.6;
|
||||
i = (int) f; // now i is 3
|
||||
|
||||
</pre>
|
||||
<p class='vspace'></p><h4>Note</h4>
|
||||
<p>When casting from a float to an int, the value is truncated not rounded. So both <code>(int) 3.2</code> and <code>(int) 3.7</code> are 3.
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='index.html'>Reference Home</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><em>Corrections, suggestions, and new documentation should be posted to the <a class='urllink' href='http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?board=swbugs' rel='nofollow'>Forum</a>.</em>
|
||||
</p>
|
||||
<p class='vspace'></p><p>The text of the Arduino reference is licensed under a
|
||||
<a class='urllink' href='http://creativecommons.org/licenses/by-sa/3.0/' rel='nofollow'>Creative Commons Attribution-ShareAlike 3.0 License</a>. Code samples in the reference are released into the public domain.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!--PageFooterFmt-->
|
@@ -0,0 +1,50 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - Changes </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
@@ -0,0 +1,46 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - Char </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
@@ -0,0 +1,43 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - CharCast </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
@@ -0,0 +1,87 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - ClientAvailable </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><strong>Reference</strong> <a class='wikilink' href='index.html'>Language</a> | <a class='wikilink' href='Libraries.html'>Libraries</a> | <a class='wikilink' href='Comparison.html'>Comparison</a> | <a class='wikilink' href='Changes.html'>Changes</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='Ethernet.html'>Ethernet</a> : <em>Client</em> class
|
||||
</p>
|
||||
<p class='vspace'></p><h2>available()</h2>
|
||||
<h4>Description</h4>
|
||||
<p>Returns the number of bytes available for reading (that is, the amount of data that has been written to the client by the server it is connected to).
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Syntax</h4>
|
||||
<p><em>client</em>.available()
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Parameters</h4>
|
||||
<p>none
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Returns</h4>
|
||||
<p>The number of bytes available.
|
||||
</p>
|
||||
<p class='vspace'></p><pre>
|
||||
#include <Ethernet.h>
|
||||
|
||||
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
|
||||
byte ip[] = { 10, 0, 0, 177 };
|
||||
byte server[] = { 64, 233, 187, 99 }; // Google
|
||||
|
||||
Client client(server, 80);
|
||||
|
||||
void setup()
|
||||
{
|
||||
Ethernet.begin(mac, ip);
|
||||
Serial.begin(9600);
|
||||
|
||||
delay(1000);
|
||||
|
@@ -0,0 +1,88 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - ClientConnect </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><strong>Reference</strong> <a class='wikilink' href='index.html'>Language</a> | <a class='wikilink' href='Libraries.html'>Libraries</a> | <a class='wikilink' href='Comparison.html'>Comparison</a> | <a class='wikilink' href='Changes.html'>Changes</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='Ethernet.html'>Ethernet</a> : <em>Client</em> class
|
||||
</p>
|
||||
<p class='vspace'></p><h2>connect()</h2>
|
||||
<h4>Description</h4>
|
||||
<p>Connect to the IP address and port specified in the constructor. The return value indicates success or failure.
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Syntax</h4>
|
||||
<p><em>client</em>.connect()
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Parameters</h4>
|
||||
<p>none
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Returns</h4>
|
||||
<p>Returns true if the connection succeeds, false if not.
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Example</h4>
|
||||
<pre>
|
||||
#include <Ethernet.h>
|
||||
|
||||
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
|
||||
byte ip[] = { 10, 0, 0, 177 };
|
||||
byte server[] = { 64, 233, 187, 99 }; // Google
|
||||
|
||||
Client client(server, 80);
|
||||
|
||||
void setup()
|
||||
{
|
||||
Ethernet.begin(mac, ip);
|
||||
Serial.begin(9600);
|
||||
|
||||
delay(1000);
|
||||
|
@@ -0,0 +1,88 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - ClientConnected </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><strong>Reference</strong> <a class='wikilink' href='index.html'>Language</a> | <a class='wikilink' href='Libraries.html'>Libraries</a> | <a class='wikilink' href='Comparison.html'>Comparison</a> | <a class='wikilink' href='Changes.html'>Changes</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='Ethernet.html'>Ethernet</a> : <em>Client</em> class
|
||||
</p>
|
||||
<p class='vspace'></p><h2>connected()</h2>
|
||||
<h4>Description</h4>
|
||||
<p>Whether or not the client is connected. Note that a client is considered connected if the connection has been closed but there is still unread data.
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Syntax</h4>
|
||||
<p><em>client</em>.connected()
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Parameters</h4>
|
||||
<p>none
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Returns</h4>
|
||||
<p>Returns true if the client is connected, false if not.
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Example</h4>
|
||||
<pre>
|
||||
#include <Ethernet.h>
|
||||
|
||||
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
|
||||
byte ip[] = { 10, 0, 0, 177 };
|
||||
byte server[] = { 64, 233, 187, 99 }; // Google
|
||||
|
||||
Client client(server, 80);
|
||||
|
||||
void setup()
|
||||
{
|
||||
Ethernet.begin(mac, ip);
|
||||
Serial.begin(9600);
|
||||
|
||||
delay(1000);
|
||||
|
@@ -0,0 +1,87 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - ClientConstructor </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><strong>Reference</strong> <a class='wikilink' href='index.html'>Language</a> | <a class='wikilink' href='Libraries.html'>Libraries</a> | <a class='wikilink' href='Comparison.html'>Comparison</a> | <a class='wikilink' href='Changes.html'>Changes</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='Ethernet.html'>Ethernet</a> : <em>Client</em> class
|
||||
</p>
|
||||
<p class='vspace'></p><h2>Client()</h2>
|
||||
<h4>Description</h4>
|
||||
<p>Creates a client which can connect to the specified internet IP address and port.
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Syntax</h4>
|
||||
<p>Client(ip, port)
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Parameters</h4>
|
||||
<p>ip: the IP address that the client will connect to (array of 4 bytes)
|
||||
</p>
|
||||
<p class='vspace'></p><p>port: the port that the client will connect to (int)
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Example</h4>
|
||||
<pre>
|
||||
#include <Ethernet.h>
|
||||
|
||||
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
|
||||
byte ip[] = { 10, 0, 0, 177 };
|
||||
byte server[] = { 64, 233, 187, 99 }; // Google
|
||||
|
||||
Client client(server, 80);
|
||||
|
||||
void setup()
|
||||
{
|
||||
Ethernet.begin(mac, ip);
|
||||
Serial.begin(9600);
|
||||
|
||||
delay(1000);
|
||||
|
@@ -0,0 +1,42 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - ClientFlush </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
@@ -0,0 +1,46 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - ClientPrint </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
@@ -0,0 +1,46 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - ClientPrintln </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
@@ -0,0 +1,42 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - ClientRead </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
@@ -0,0 +1,43 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - ClientStop </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
@@ -0,0 +1,41 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - ClientWrite </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
@@ -0,0 +1,49 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - Comments </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
@@ -0,0 +1,55 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - Comparison </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><strong>Reference</strong> <a class='wikilink' href='index.html'>Language</a> | <a class='wikilink' href='Libraries.html'>Libraries</a> | <a class='selflink' href='Comparison.html'>Comparison</a> | <a class='wikilink' href='Changes.html'>Changes</a>
|
@@ -0,0 +1,51 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - Const </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
@@ -0,0 +1,73 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - Constants </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><strong>Reference</strong> <a class='wikilink' href='index.html'>Language</a> | <a class='wikilink' href='Libraries.html'>Libraries</a> | <a class='wikilink' href='Comparison.html'>Comparison</a> | <a class='wikilink' href='Changes.html'>Changes</a>
|
||||
</p>
|
||||
<p class='vspace'></p><h2>constants</h2>
|
||||
<p>Constants are predefined variables in the Arduino language. They are used to make the programs easier to read. We classify constants in groups.
|
||||
</p>
|
||||
<p class='vspace'></p><h3>Defining Logical Levels, true and false (Boolean Constants)</h3>
|
||||
<p>There are two constants used to represent truth and falsity in the Arduino language: <strong>true</strong>, and <strong>false</strong>.
|
||||
</p>
|
||||
<p class='vspace'></p><h4>false</h4>
|
||||
<p>false is the easier of the two to define. false is defined as 0 (zero).
|
||||
</p>
|
||||
<p class='vspace'></p><h4>true</h4>
|
||||
<p>true is often said to be defined as 1, which is correct, but true has a wider definition. Any integer which is <em>non-zero</em> is TRUE, in a Boolean sense. So -1, 2 and -200 are all defined as true, too, in a Boolean sense.
|
||||
</p>
|
||||
<p class='vspace'></p><p>Note that the <em>true</em> and <em>false</em> constants are typed in lowercase unlike HIGH, LOW, INPUT, & OUTPUT.
|
||||
</p>
|
||||
<p class='vspace'></p><h3>Defining Pin Levels, HIGH and LOW</h3>
|
||||
<p>When reading or writing to a digital pin there are only two possible values a pin can take/be-set-to: <strong>HIGH</strong> and <strong>LOW</strong>.
|
||||
</p>
|
@@ -0,0 +1,53 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - Constrain </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
@@ -0,0 +1,45 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - Continue </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
@@ -0,0 +1,45 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - Cos </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
@@ -0,0 +1,60 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - Define </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><strong>Reference</strong> <a class='wikilink' href='index.html'>Language</a> | <a class='wikilink' href='Libraries.html'>Libraries</a> | <a class='wikilink' href='Comparison.html'>Comparison</a> | <a class='wikilink' href='Changes.html'>Changes</a>
|
||||
</p>
|
||||
<p class='vspace'></p><h2>Define</h2>
|
||||
<p><code>#define</code> is a useful C component that allows the programmer to give a name to a constant value before the program is compiled. Defined constants in arduino don't take up any program memory space on the chip. The compiler will replace references to these constants with the defined value at compile time.
|
||||
</p>
|
||||
<p class='vspace'></p><p>This can have some unwanted side effects though, if for example, a constant name that had been #defined is included in some other constant or variable name. In that case the text would be replaced by the #defined number (or text).
|
@@ -0,0 +1,69 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - Delay </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><strong>Reference</strong> <a class='wikilink' href='index.html'>Language</a> | <a class='wikilink' href='Libraries.html'>Libraries</a> | <a class='wikilink' href='Comparison.html'>Comparison</a> | <a class='wikilink' href='Changes.html'>Changes</a>
|
||||
</p>
|
||||
<p class='vspace'></p><h2>delay()</h2>
|
||||
<h4>Description</h4>
|
||||
<p>Pauses the program for the amount of time (in miliseconds) specified as parameter. (There are 1000 milliseconds in a second.)
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Syntax</h4>
|
||||
<p>delay(ms)
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Parameters</h4>
|
||||
<p>ms: the number of milliseconds to pause (<em>unsigned long</em>)
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Returns</h4>
|
||||
<p>nothing
|
||||
</p>
|
@@ -0,0 +1,72 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - DelayMicroseconds </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><strong>Reference</strong> <a class='wikilink' href='index.html'>Language</a> | <a class='wikilink' href='Libraries.html'>Libraries</a> | <a class='wikilink' href='Comparison.html'>Comparison</a> | <a class='wikilink' href='Changes.html'>Changes</a>
|
||||
</p>
|
||||
<p class='vspace'></p><h2>delayMicroseconds()</h2>
|
||||
<h4>Description</h4>
|
||||
<p>Pauses the program for the amount of time (in microseconds) specified as parameter. There are a thousand microseconds in a millisecond, and a million microseconds in a second.
|
||||
</p>
|
||||
<p class='vspace'></p><p>Currently, the largest value that will produce an accurate delay is 16383. This could change in future Arduino releases. For delays longer than a few thousand microseconds, you should use delay() instead.
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Syntax</h4>
|
||||
<p>delayMicroseconds(us)
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Parameters</h4>
|
||||
<p>us: the number of microseconds to pause (<em>unsigned int</em>)
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Returns</h4>
|
||||
<p>None
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Example</h4>
|
@@ -0,0 +1,37 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - DetachInterrupt </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
@@ -0,0 +1,71 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - DigitalRead </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><strong>Reference</strong> <a class='wikilink' href='index.html'>Language</a> | <a class='wikilink' href='Libraries.html'>Libraries</a> | <a class='wikilink' href='Comparison.html'>Comparison</a> | <a class='wikilink' href='Changes.html'>Changes</a>
|
||||
</p>
|
||||
<p class='vspace'></p><h2>digitalRead()</h2>
|
||||
<h4>Description</h4>
|
||||
<p>Reads the value from a specified digital pin, either <a class='wikilink' href='Constants.html'>HIGH</a> or <a class='wikilink' href='Constants.html'>LOW</a>.
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Syntax</h4>
|
||||
<p>digitalRead(pin)
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Parameters</h4>
|
||||
<p>pin: the number of the digital pin you want to read (<em>int</em>)
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Returns</h4>
|
||||
<p><a class='wikilink' href='Constants.html'>HIGH</a> or <a class='wikilink' href='Constants.html'>LOW</a>
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Example</h4>
|
||||
<pre>
|
@@ -0,0 +1,76 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - DigitalWrite </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><strong>Reference</strong> <a class='wikilink' href='index.html'>Language</a> | <a class='wikilink' href='Libraries.html'>Libraries</a> | <a class='wikilink' href='Comparison.html'>Comparison</a> | <a class='wikilink' href='Changes.html'>Changes</a>
|
||||
</p>
|
||||
<p class='vspace'></p><h2>digitalWrite()</h2>
|
||||
<h4>Description</h4>
|
||||
<p>Write a <a class='wikilink' href='Constants.html'>HIGH</a> or a <a class='wikilink' href='Constants.html'>LOW</a> value to a digital pin.
|
||||
</p>
|
||||
<p class='vspace'></p><p>If the pin has been configured as an OUTPUT with <a class='wikilink' href='PinMode.html'>pinMode</a>(), its voltage will be set to the corresponding value: 5V (or 3.3V on 3.3V boards) for HIGH, 0V (ground) for LOW.
|
||||
</p>
|
||||
<p class='vspace'></p><p>If the pin is configured as an INPUT, writing a HIGH value with digitalWrite() will enable an internal 20K pullup resistor (see the <a class='wikilink' href='http://arduino.cc/en/Tutorial/DigitalPins'>tutorial on digital pins</a>). Writing LOW will disable the pullup. The pullup resistor is enough to light an LED dimly, so if <span class='wikiword'>LEDs</span> appear to work, but very dimly, this is a likely cause. The remedy is to set the pin to an output with the pinMode() function.
|
||||
</p>
|
||||
<p class='vspace'></p><p><strong>NOTE:</strong> Digital pin 13 is harder to use as a digital input than the other digital pins because it has an LED and resistor attached to it that's soldered to the board on most boards. If you enable its internal 20k pull-up resistor, it will hang at around 1.7 V instead of the expected 5V because the onboard LED and series resistor pull the voltage level down, meaning it always returns LOW. If you must use pin 13 as a digital input, use an external pull down resistor.
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Syntax</h4>
|
||||
<p>digitalWrite(pin, value)
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Parameters</h4>
|
||||
<p>pin: the pin number
|
||||
</p>
|
||||
<p class='vspace'></p><p>value: <a class='wikilink' href='Constants.html'>HIGH</a> or <a class='wikilink' href='Constants.html'>LOW</a>
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Returns</h4>
|
||||
<p>none
|
@@ -0,0 +1,48 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - DoWhile </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
@@ -0,0 +1,39 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - Double </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
@@ -0,0 +1,34 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - EEPROM </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
@@ -0,0 +1,70 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - EEPROMRead </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><strong>Reference</strong> <a class='wikilink' href='index.html'>Language</a> | <a class='wikilink' href='Libraries.html'>Libraries</a> | <a class='wikilink' href='Comparison.html'>Comparison</a> | <a class='wikilink' href='Changes.html'>Changes</a>
|
||||
</p>
|
||||
<p class='vspace'></p><h2>byte EEPROM.read(address)</h2>
|
||||
<h4>Description</h4>
|
||||
<p>Reads a byte from the EEPROM. Locations that have never been written to have the value of 255.
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Parameters</h4>
|
||||
<p>address: the location to read from, from 0 to 511 (<em>int</em>)
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Returns</h4>
|
||||
<p>the value stored in that location (<em>byte</em>)
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Example</h4>
|
||||
<pre>
|
||||
#include <EEPROM.h>
|
||||
|
@@ -0,0 +1,63 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - EEPROMWrite </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><strong>Reference</strong> <a class='wikilink' href='index.html'>Language</a> | <a class='wikilink' href='Libraries.html'>Libraries</a> | <a class='wikilink' href='Comparison.html'>Comparison</a> | <a class='wikilink' href='Changes.html'>Changes</a>
|
||||
</p>
|
||||
<p class='vspace'></p><h2>EEPROM.write(address, value)</h2>
|
||||
<h4>Description</h4>
|
||||
<p>Write a byte to the EEPROM.
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Parameters</h4>
|
||||
<p>address: the location to write to, from 0 to 511 (<em>int</em>)
|
||||
</p>
|
@@ -0,0 +1,64 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - Else </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><strong>Reference</strong> <a class='wikilink' href='index.html'>Language</a> | <a class='wikilink' href='Libraries.html'>Libraries</a> | <a class='wikilink' href='Comparison.html'>Comparison</a> | <a class='wikilink' href='Changes.html'>Changes</a>
|
||||
</p>
|
||||
<p class='vspace'></p><h2>if / else</h2>
|
||||
<p><strong>if/else</strong> allows greater control over the flow of code than the basic <strong>if</strong> statement, by allowing multiple tests to be grouped together. For example, an analog input could be tested and one action taken if the input was less than 500, and another action taken if the input was 500 or greater. The code would look like this:
|
||||
</p>
|
||||
<p class='vspace'></p><pre>if (pinFiveInput < 500)
|
||||
{
|
||||
// action A
|
||||
}
|
||||
else
|
@@ -0,0 +1,57 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - Ethernet </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><strong>Reference</strong> <a class='wikilink' href='index.html'>Language</a> | <a class='wikilink' href='Libraries.html'>Libraries</a> | <a class='wikilink' href='Comparison.html'>Comparison</a> | <a class='wikilink' href='Changes.html'>Changes</a>
|
||||
</p>
|
||||
<p class='vspace'></p><h2>Ethernet library</h2>
|
@@ -0,0 +1,63 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - EthernetBegin </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><strong>Reference</strong> <a class='wikilink' href='index.html'>Language</a> | <a class='wikilink' href='Libraries.html'>Libraries</a> | <a class='wikilink' href='Comparison.html'>Comparison</a> | <a class='wikilink' href='Changes.html'>Changes</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='Ethernet.html'>Ethernet</a>
|
||||
</p>
|
||||
<p class='vspace'></p><h2>Ethernet.begin()</h2>
|
||||
<h4>Description</h4>
|
||||
<p>Initializes the ethernet library and network settings.
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Syntax</h4>
|
@@ -0,0 +1,226 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - Extended Reference </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><strong>Reference</strong> <a class='wikilink' href='index.html'>Language</a> (<a class='selflink' href='Extended.html'>extended</a>) | <a class='wikilink' href='Libraries.html'>Libraries</a> | <a class='wikilink' href='Comparison.html'>Comparison</a> | <a class='wikilink' href='Changes.html'>Changes</a>
|
||||
</p>
|
||||
<p class='vspace'></p><h1>Language Reference (extended)</h1>
|
||||
<p>The Arduino language is based on C/C++ and supports all standard C constructs and some C++ features. It links against <a class='urllink' href='http://www.nongnu.org/avr-libc/' rel='nofollow'>AVR Libc</a> and allows the use of any of its functions; see its <a class='urllink' href='http://www.nongnu.org/avr-libc/user-manual/index.html' rel='nofollow'>user manual</a> for details.
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
<table width='100%' border='0' cellpadding='5' cellspacing='0'><tr><td width='50%' valign='top'>
|
||||
<h2>Structure</h2>
|
||||
<ul><li>void <a class='wikilink' href='Setup.html'>setup</a>()
|
||||
</li><li>void <a class='wikilink' href='Loop.html'>loop</a>()
|
||||
</li></ul><p class='vspace'></p><h4>Control Structures</h4>
|
||||
<ul><li><a class='wikilink' href='If.html'>if</a>
|
||||
</li><li><a class='wikilink' href='Else.html'>if...else</a>
|
||||
</li><li><a class='wikilink' href='For.html'>for</a>
|
||||
</li><li><a class='wikilink' href='SwitchCase.html'>switch case</a>
|
||||
</li><li><a class='wikilink' href='While.html'>while</a>
|
||||
</li><li><a class='wikilink' href='DoWhile.html'>do... while</a>
|
||||
</li><li><a class='wikilink' href='Break.html'>break</a>
|
||||
</li><li><a class='wikilink' href='Continue.html'>continue</a>
|
||||
</li><li><a class='wikilink' href='Return.html'>return</a>
|
||||
</li><li><a class='wikilink' href='Goto.html'>goto</a>
|
||||
</li></ul><p class='vspace'></p><h4>Further Syntax</h4>
|
||||
<ul><li><a class='wikilink' href='SemiColon.html'>;</a> (semicolon)
|
||||
</li><li><a class='wikilink' href='Braces.html'>{}</a> (curly braces)
|
||||
</li><li><a class='wikilink' href='Comments.html'>//</a> (single line comment)
|
||||
</li><li><a class='wikilink' href='Comments.html'>/* */</a> (multi-line comment)
|
||||
</li><li><a class='wikilink' href='Define.html'>#define</a>
|
||||
</li><li><a class='wikilink' href='Include.html'>#include</a>
|
||||
</li></ul><p class='vspace'></p><h4>Arithmetic Operators</h4>
|
||||
<ul><li><a class='wikilink' href='Assignment.html'>=</a> (assignment operator)
|
||||
</li><li><a class='wikilink' href='Arithmetic.html'>+ </a> (addition)
|
||||
</li><li><a class='wikilink' href='Arithmetic.html'>-</a> (subtraction)
|
||||
</li><li><a class='wikilink' href='Arithmetic.html'>*</a> (multiplication)
|
||||
</li><li><a class='wikilink' href='Arithmetic.html'>/</a> (division)
|
||||
</li><li><a class='wikilink' href='Modulo.html'>%</a> (modulo)
|
||||
</li></ul><p class='vspace'></p><h4>Comparison Operators</h4>
|
||||
<ul><li><a class='wikilink' href='If.html'>==</a> (equal to)
|
||||
</li><li><a class='wikilink' href='If.html'>!=</a> (not equal to)
|
||||
</li><li><a class='wikilink' href='If.html'><</a> (less than)
|
||||
</li><li><a class='wikilink' href='If.html'>></a> (greater than)
|
||||
</li><li><a class='wikilink' href='If.html'><=</a> (less than or equal to)
|
||||
</li><li><a class='wikilink' href='If.html'>>=</a> (greater than or equal to)
|
||||
</li></ul><p class='vspace'></p><h4>Boolean Operators</h4>
|
||||
<ul><li><a class='wikilink' href='Boolean.html'>&&</a> (and)
|
||||
</li><li><a class='wikilink' href='Boolean.html'>||</a> (or)
|
||||
</li><li><a class='wikilink' href='Boolean.html'>!</a> (not)
|
||||
</li></ul><p class='vspace'></p><h4>Pointer Access Operators</h4>
|
||||
<ul><li><a class='wikilink' href='Pointer.html'>* dereference operator</a>
|
||||
</li><li><a class='wikilink' href='Pointer.html'>& reference operator</a>
|
||||
</li></ul><p class='vspace'></p><h4>Bitwise Operators</h4>
|
||||
<ul><li><a class='wikilink' href='BitwiseAnd.html'>&</a> (bitwise and)
|
||||
</li><li><a class='wikilink' href='BitwiseAnd.html'>|</a> (bitwise or)
|
||||
</li><li><a class='wikilink' href='BitwiseAnd.html'>^</a> (bitwise xor)
|
||||
</li><li><a class='wikilink' href='BitwiseXorNot.html'>~</a> (bitwise not)
|
||||
</li><li><a class='wikilink' href='Bitshift.html'><<</a> (bitshift left)
|
||||
</li><li><a class='wikilink' href='Bitshift.html'>>></a> (bitshift right)
|
||||
<p class='vspace'></p></li><li><a class='wikilink' href='PortManipulation.html'>Port Manipulation</a>
|
||||
</li></ul><p class='vspace'></p><h4>Compound Operators</h4>
|
||||
<ul><li><a class='wikilink' href='Increment.html'>++</a> (increment)
|
||||
</li><li><a class='wikilink' href='Increment.html'>--</a> (decrement)
|
||||
</li><li><a class='wikilink' href='IncrementCompound.html'>+=</a> (compound addition)
|
||||
</li><li><a class='wikilink' href='IncrementCompound.html'>-=</a> (compound subtraction)
|
||||
</li><li><a class='wikilink' href='IncrementCompound.html'>*=</a> (compound multiplication)
|
||||
</li><li><a class='wikilink' href='IncrementCompound.html'>/=</a> (compound division)
|
||||
<p class='vspace'></p></li><li><a class='wikilink' href='BitwiseCompound.html'>&=</a> (compound bitwise and)
|
||||
</li><li><a class='wikilink' href='BitwiseCompound.html'>|=</a> (compound bitwise or)
|
||||
</li></ul><p class='vspace'></p><h2>Variables</h2>
|
||||
<h4>Constants</h4>
|
||||
<ul><li><a class='wikilink' href='Constants.html'>HIGH</a> | <a class='wikilink' href='Constants.html'>LOW</a>
|
||||
</li><li><a class='wikilink' href='Constants.html'>INPUT</a> | <a class='wikilink' href='Constants.html'>OUTPUT</a>
|
||||
</li><li><a class='wikilink' href='Constants.html'>true</a> | <a class='wikilink' href='Constants.html'>false</a>
|
||||
</li><li><a class='wikilink' href='IntegerConstants.html'>integer constants</a>
|
||||
</li><li><a class='wikilink' href='Fpconstants.html'>floating point constants</a>
|
||||
</li></ul><p class='vspace'></p><h4>Data Types</h4>
|
||||
<ul><li><a class='wikilink' href='Void.html'>void keyword</a>
|
||||
</li><li><a class='wikilink' href='BooleanVariables.html'>boolean</a>
|
||||
</li><li><a class='wikilink' href='Char.html'>char</a>
|
||||
</li><li><a class='wikilink' href='UnsignedChar.html'>unsigned char</a>
|
||||
</li><li><a class='wikilink' href='Byte.html'>byte</a>
|
||||
</li><li><a class='wikilink' href='Int.html'>int</a>
|
||||
</li><li><a class='wikilink' href='UnsignedInt.html'>unsigned int</a>
|
||||
</li><li><a class='wikilink' href='Word.html'>word</a>
|
||||
</li><li><a class='wikilink' href='Long.html'>long</a>
|
||||
</li><li><a class='wikilink' href='UnsignedLong.html'>unsigned long</a>
|
||||
</li><li><a class='wikilink' href='Float.html'>float</a>
|
||||
</li><li><a class='wikilink' href='Double.html'>double</a>
|
||||
</li><li><a class='wikilink' href='String.html'>string</a>
|
||||
</li><li><a class='wikilink' href='Array.html'>array</a>
|
||||
</li></ul><p class='vspace'></p><h4>Conversion</h4>
|
||||
<ul><li><a class='wikilink' href='CharCast.html'>char()</a>
|
||||
</li><li><a class='wikilink' href='ByteCast.html'>byte()</a>
|
||||
</li><li><a class='wikilink' href='IntCast.html'>int()</a>
|
||||
</li><li><a class='wikilink' href='WordCast.html'>word()</a>
|
||||
</li><li><a class='wikilink' href='LongCast.html'>long()</a>
|
||||
</li><li><a class='wikilink' href='FloatCast.html'>float()</a>
|
||||
</li></ul><p class='vspace'></p><h4>Variable Scope & Qualifiers</h4>
|
||||
<ul><li><a class='wikilink' href='Scope.html'>variable scope</a>
|
||||
</li><li><a class='wikilink' href='Static.html'>static</a>
|
||||
</li><li><a class='wikilink' href='Volatile.html'>volatile</a>
|
||||
</li><li><a class='wikilink' href='Const.html'>const</a>
|
||||
</li></ul><p class='vspace'></p><h4>Utilities</h4>
|
||||
<ul><li><a class='wikilink' href='Sizeof.html'>sizeof</a>() (sizeof operator)
|
||||
</li></ul><p class='vspace'></p><h2>Reference</h2>
|
||||
<ul><li><a class='wikilink' href='ASCIIchart.html'>ASCII chart</a>
|
||||
</li></ul></td><td width='50%' valign='top'>
|
||||
<p class='vspace'></p><h2>Functions</h2>
|
||||
<p><strong>Digital I/O</strong>
|
||||
</p><ul><li><a class='wikilink' href='PinMode.html'>pinMode</a>(pin, mode)
|
||||
</li><li><a class='wikilink' href='DigitalWrite.html'>digitalWrite</a>(pin, value)
|
||||
</li><li>int <a class='wikilink' href='DigitalRead.html'>digitalRead</a>(pin)
|
||||
</li></ul><p class='vspace'></p><p><strong>Analog I/O</strong>
|
||||
</p><ul><li><a class='wikilink' href='AnalogReference.html'>analogReference</a>(type)
|
||||
</li><li>int <a class='wikilink' href='AnalogRead.html'>analogRead</a>(pin)
|
||||
</li><li><a class='wikilink' href='AnalogWrite.html'>analogWrite</a>(pin, value) - <em>PWM</em>
|
||||
</li></ul><p class='vspace'></p><p><strong>Advanced I/O</strong>
|
||||
</p><ul><li><a class='wikilink' href='ShiftOut.html'>shiftOut</a>(dataPin, clockPin, bitOrder, value)
|
||||
</li><li>unsigned long <a class='wikilink' href='PulseIn.html'>pulseIn</a>(pin, value)
|
||||
</li></ul><p class='vspace'></p><p><strong>Time</strong>
|
||||
</p><ul><li>unsigned long <a class='wikilink' href='Millis.html'>millis</a>()
|
||||
</li><li>unsigned long <a class='wikilink' href='Micros.html'>micros</a>()
|
||||
</li><li><a class='wikilink' href='Delay.html'>delay</a>(ms)
|
||||
</li><li><a class='wikilink' href='DelayMicroseconds.html'>delayMicroseconds</a>(us)
|
||||
</li></ul><p class='vspace'></p><p><strong>Math</strong>
|
||||
</p><ul><li><a class='wikilink' href='Min.html'>min</a>(x, y)
|
||||
</li><li><a class='wikilink' href='Max.html'>max</a>(x, y)
|
||||
</li><li><a class='wikilink' href='Abs.html'>abs</a>(x)
|
||||
</li><li><a class='wikilink' href='Constrain.html'>constrain</a>(x, a, b)
|
||||
</li><li><a class='wikilink' href='Map.html'>map</a>(value, fromLow, fromHigh, toLow, toHigh)
|
||||
</li><li><a class='wikilink' href='Pow.html'>pow</a>(base, exponent)
|
||||
</li><li><a class='wikilink' href='Sqrt.html'>sqrt</a>(x)
|
||||
</li></ul><p class='vspace'></p><p><strong>Trigonometry</strong>
|
||||
</p><ul><li><a class='wikilink' href='Sin.html'>sin</a>(rad)
|
||||
</li><li><a class='wikilink' href='Cos.html'>cos</a>(rad)
|
||||
</li><li><a class='wikilink' href='Tan.html'>tan</a>(rad)
|
||||
</li></ul><p class='vspace'></p><p><strong>Random Numbers</strong>
|
||||
</p>
|
||||
<p class='vspace'></p><ul><li><a class='wikilink' href='RandomSeed.html'>randomSeed</a>(seed)
|
||||
</li><li>long <a class='wikilink' href='Random.html'>random</a>(max)
|
||||
</li><li>long <a class='wikilink' href='Random.html'>random</a>(min, max)
|
||||
</li></ul><p class='vspace'></p><p><strong>Bits and Bytes</strong>
|
||||
</p><ul><li><a class='wikilink' href='LowByte.html'>lowByte</a>()
|
||||
</li><li><a class='wikilink' href='HighByte.html'>highByte</a>()
|
||||
</li><li><a class='wikilink' href='BitRead.html'>bitRead</a>()
|
||||
</li><li><a class='wikilink' href='BitWrite.html'>bitWrite</a>()
|
||||
</li><li><a class='wikilink' href='BitSet.html'>bitSet</a>()
|
||||
</li><li><a class='wikilink' href='BitClear.html'>bitClear</a>()
|
||||
</li><li><a class='wikilink' href='Bit.html'>bit</a>()
|
||||
</li></ul><p class='vspace'></p><p><strong>External Interrupts</strong>
|
||||
</p>
|
||||
<p class='vspace'></p><ul><li><a class='wikilink' href='AttachInterrupt.html'>attachInterrupt</a>(interrupt, function, mode)
|
||||
</li><li><a class='wikilink' href='DetachInterrupt.html'>detachInterrupt</a>(interrupt)
|
||||
</li></ul><p class='vspace'></p><p><strong>Interrupts</strong>
|
||||
</p>
|
||||
<p class='vspace'></p><ul><li><a class='wikilink' href='Interrupts.html'>interrupts</a>()
|
||||
</li><li><a class='wikilink' href='NoInterrupts.html'>noInterrupts</a>()
|
||||
</li></ul><p class='vspace'></p><p><strong>Communication</strong>
|
||||
</p>
|
||||
<p class='vspace'></p><ul><li><a class='wikilink' href='Serial.html'>Serial</a>
|
||||
</li></ul><p class='vspace'></p><p><strong>Looking for something else?</strong> Try the list of <a class='urllink' href='http://www.arduino.cc/playground/Main/GeneralCodeLibrary' rel='nofollow'>community-contributed code</a>.
|
||||
</p>
|
||||
<p class='vspace'></p></td></tr></table>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='index.html'>Reference Home</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><em>Corrections, suggestions, and new documentation should be posted to the <a class='urllink' href='http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?board=swbugs' rel='nofollow'>Forum</a>.</em>
|
||||
</p>
|
||||
<p class='vspace'></p><p>The text of the Arduino reference is licensed under a
|
||||
<a class='urllink' href='http://creativecommons.org/licenses/by-sa/3.0/' rel='nofollow'>Creative Commons Attribution-ShareAlike 3.0 License</a>. Code samples in the reference are released into the public domain.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!--PageFooterFmt-->
|
@@ -0,0 +1,100 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - FAQ </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='selflink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<h2>Frequently Asked Questions</h2>
|
||||
<p><strong>What is an Arduino?</strong>
|
||||
</p>
|
||||
<p class='vspace'></p><p>Glad you asked, we have a great introduction page on Arduino, <a class='urllink' href='http://www.arduino.cc/en/Guide/Introduction' rel='nofollow'>click here to read it.</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><strong>What do you mean by open-source hardware?</strong>
|
||||
</p>
|
||||
<p class='vspace'></p><p>Open-source hardware shares much of the principles and approach of free and open-source software. In particular, we believe that people should be able to study our hardware to understand how it works, make changes to it, and share those changes. To facilitate this, we release all of the original design files (Eagle CAD) for the Arduino hardware. These files are licensed under a Creative Commons Attribution Share-Alike license, which allows for both personal and commercial derivative works, as long as they credit Arduino and release their designs under the same license.
|
||||
</p>
|
||||
<p class='vspace'></p><p>The Arduino software is also open-source. The source code for the Java environment is released under the GPL and the C/C++ microcontroller libraries are under the LGPL.
|
||||
</p>
|
||||
<p class='vspace'></p><p><strong>How can I get an Arduino board?</strong>
|
||||
</p>
|
||||
<p class='vspace'></p><p>You can buy an Arduino board from one of the distributors listed on the <a class='wikilink' href='http://arduino.cc/en/Main/Buy'>buy</a> page. If you'd prefer to build your own, see the <a class='wikilink' href='http://arduino.cc/en/Main/ArduinoBoardSerialSingleSided3'>Arduino Single-Sided Serial board</a>, which can be easily etched and assembled.
|
||||
</p>
|
||||
<p class='vspace'></p><p><strong>Who makes Arduino boards?</strong>
|
||||
</p>
|
||||
<p class='vspace'></p><p>Most of the official Arduino boards are manufactured by <span class='wikiword'>SmartProjects</span> in Italy. The Arduino Pro, Pro Mini, and <span class='wikiword'>LilyPad</span> are manufactured by <span class='wikiword'>SparkFun</span> Electronics (a US company). The Arduino Nano is manufactured by Gravitech (also a US company).
|
||||
</p>
|
||||
<p class='vspace'></p><p><strong>Which are the official Arduino boards?</strong>
|
||||
</p>
|
||||
<p class='vspace'></p><p>The official Arduino boards are the ones listed on the <a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>hardware page</a>: the Duemilanove, Nano, Mega, Bluetooth (BT), <span class='wikiword'>LilyPad</span>, Mini, Pro, Pro Mini, and a few older models, along with the Ethernet, <span class='wikiword'>XBee</span>, motor, and prototyping shields. These are boards whose manufacturers work with the Arduino team to ensure a good user experience, compatibility with the Arduino software, and a quality product. In return for their status as official boards, the manufacturers pay a licensing fee to the Arduino team to support the further development of the project.
|
||||
</p>
|
||||
<p class='vspace'></p><p>In general, we try to restrict use of the name "Arduino" to the official boards. If you find a product under a different name but described as "Arduino compatible", it’s probably not an official board and doesn’t fund continued work on the project.
|
||||
</p>
|
||||
<p class='vspace'></p><p><strong>I want to design my own board; what should I do?</strong>
|
||||
</p>
|
||||
<p class='vspace'></p><p>The reference designs for the Arduino boards are available from the <a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>hardware</a> page. They're licensed under a Creative Commons Attribution Share-Alike license, so you are free to use and adapt them for your own needs without asking permission or paying a fee. If you're looking to make something of interest to the community, we'd encourage you to discuss your ideas on the <a class='urllink' href='http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?board=hwdev' rel='nofollow'>hardware development forum</a> so that potential users can offer suggestions.
|
||||
</p>
|
||||
<p class='vspace'></p><p><a name='naming' id='naming'></a>
|
||||
<strong>What should I call my boards?</strong>
|
||||
</p>
|
||||
<p class='vspace'></p><p>If you're making your own board, come up with your own name! This will allow people identify you with your products and help you to build a brand. Be creative: try to suggest what people might use the board for, or emphasize the form factor, or just pick a random word that sounds cool. "Arduino" is a trademark of Arduino team and should not be used for unofficial variants. If you're interested in having your design included in the official Arduino product line, please see the <a class='wikilink' href='http://arduino.cc/en/Main/Policy'>So you want to make an Arduino</a> document and contact the Arduino team.
|
||||
</p>
|
||||
<p class='vspace'></p><p>While unofficial products should not have "Arduino" in their name, it's okay to describe your product in relation to the Arduino project and platform. Here are a few guidelines that explain which uses we consider reasonable.
|
||||
</p>
|
||||
<p class='vspace'></p><p>Not okay:
|
||||
</p>
|
||||
<p class='vspace'></p><ul><li>Arduino Xxxxxx
|
||||
</li><li>Xxxxxx Arduino
|
||||
</li><li>Arduino Compatible Xxxxxx - use "Xxxxxx (Arduino-Compatible)" instead
|
||||
</li></ul><p class='vspace'></p><p>Okay:
|
||||
</p>
|
||||
<p class='vspace'></p><ul><li>Xxxxxx for Arduino - products that work with official Arduino boards (e.g. shields or kits)
|
||||
</li><li>Xxxxxx (Arduino-Compatible) - variations and clones which are software and hardware compatible
|
||||
</li></ul><p class='vspace'></p><p>Note that while we don't attempt to restrict uses of the "duino" suffix, its use causes the Italians on the team to cringe (apparently it sounds terrible); you might want to avoid it. (It's also trademarked by a Hungarian company.)
|
@@ -0,0 +1,61 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - Float </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><strong>Reference</strong> <a class='wikilink' href='index.html'>Language</a> | <a class='wikilink' href='Libraries.html'>Libraries</a> | <a class='wikilink' href='Comparison.html'>Comparison</a> | <a class='wikilink' href='Changes.html'>Changes</a>
|
||||
</p>
|
||||
<p class='vspace'></p><h2>float</h2>
|
||||
<h4>Description </h4>
|
||||
<p>Datatype for floating-point numbers, a number that has a decimal point. Floating-point numbers are often used to approximate analog and continuous values because they have greater resolution than integers. Floating-point numbers can be as large as 3.4028235E+38 and as low as -3.4028235E+38. They are stored as 32 bits (4 bytes) of information.
|
||||
</p>
|
||||
<p class='vspace'></p><p>Floats have only 6-7 decimal digits of precision. That means the total number of digits, not the number to the right of the decimal point. Unlike other platforms, where you can get more precision by using a double (e.g. up to 15 digits), on the Arduino, double is the same size as float.
|
@@ -0,0 +1,46 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - FloatCast </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
@@ -0,0 +1,85 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - For </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><strong>Reference</strong> <a class='wikilink' href='index.html'>Language</a> | <a class='wikilink' href='Libraries.html'>Libraries</a> | <a class='wikilink' href='Comparison.html'>Comparison</a> | <a class='wikilink' href='Changes.html'>Changes</a>
|
||||
</p>
|
||||
<p class='vspace'></p><h2>for statements</h2>
|
||||
<h4>Desciption</h4>
|
||||
<p>The <strong>for</strong> statement is used to repeat a block of statements enclosed in curly braces. An increment counter is usually used to increment and terminate the loop. The <strong>for</strong> statement is useful for any repetitive operation, and is often used in combination with arrays to operate on collections of data/pins.
|
||||
</p>
|
||||
<p class='vspace'></p><p>There are three parts to the <strong>for</strong> loop header:
|
||||
</p>
|
||||
<p class='vspace'></p><p><code><strong>for</strong> (<strong>initialization</strong>;<strong> condition</strong>;<strong> increment</strong>) {</code>
|
||||
</p>
|
||||
<p class='vspace'></p><p><code> //statement(s);</code>
|
||||
</p>
|
||||
<p class='vspace'></p><p><code>}</code>
|
||||
</p><div><img height='220px' src='http://arduino.cc/en/uploads/Reference/ForLoopIllustrated.png' alt='' title='' /></div>
|
||||
<p class='vspace'></p><p>The <strong>initialization</strong> happens first and exactly once. Each time through the loop, the <strong>condition</strong> is tested; if it's true, the statement block, and the <strong>increment</strong> is executed, then the <strong>condition</strong> is tested again. When the <strong>condition</strong> becomes false, the loop ends.
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Example</h4>
|
||||
<pre>
|
||||
// Dim an LED using a PWM pin
|
||||
int PWMpin = 10; // LED in series with 470 ohm resistor on pin 10
|
||||
|
||||
void setup()
|
||||
{
|
||||
// no setup needed
|
||||
}
|
||||
|
||||
void loop()
|
||||
{
|
||||
for (int i=0; i <= 255; i++){
|
||||
analogWrite(PWMpin, i);
|
||||
delay(10);
|
@@ -0,0 +1,47 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - Fpconstants </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
@@ -0,0 +1,140 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - FunctionDeclaration </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://www.arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://www.arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://www.arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://www.arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><strong>Reference</strong> <a class='wikilink' href='index.html'>Language</a> (<a class='wikilink' href='Extended.html'>extended</a>) | <a class='wikilink' href='Libraries.html'>Libraries</a> | <a class='wikilink' href='Comparison.html'>Comparison</a> | <a class='wikilink' href='Board.html'>Board</a>
|
||||
</p>
|
||||
<p class='vspace'></p><h2>Functions</h2>
|
||||
<p>Segmenting code into functions allows a programmer to create modular pieces of code that perform a defined task and then return to the area of code from which the function was "called". The typical case for creating a function is when one needs to perform the same action multiple times in a program.
|
||||
</p>
|
||||
<p class='vspace'></p><p>For programmers accustomed to using BASIC, functions in Arduino provide (and extend) the utility of using subroutines (GOSUB in BASIC).
|
||||
</p>
|
||||
<p class='vspace'></p><p>Standardizing code fragments into functions has several advantages:
|
||||
</p>
|
||||
<p class='vspace'></p><ul><li>Functions help the programmer stay organized. Often this helps to conceptualize the program.
|
||||
<p class='vspace'></p></li><li>Functions codify one action in one place so that the function only has to be thought out and debugged once.
|
||||
<p class='vspace'></p></li><li>This also reduces chances for errors in modification, if the code needs to be changed.
|
||||
<p class='vspace'></p></li><li>Functions make the whole sketch smaller and more compact because sections of code are reused many times.
|
||||
<p class='vspace'></p></li><li>They make it easier to reuse code in other programs by making it more modular, and as a nice side effect, using functions also often makes the code more readable.
|
||||
</li></ul><p class='vspace'></p><p>There are two required functions in an Arduino sketch, setup() and loop(). Other functions must be created outside the brackets of those two functions. As an example, we will create a simple function to multiply two numbers.
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Example</h4>
|
||||
<div><img src='http://www.arduino.cc/en/uploads/Reference/FuncAnatomy.png' alt='' title='' /></div>
|
||||
<p class='vspace'></p><p>To "call" our simple multiply function, we pass it parameters of the datatype that it is expecting:
|
||||
</p>
|
||||
<p class='vspace'></p><pre>
|
||||
void loop{
|
||||
int i = 2;
|
||||
int j = 3;
|
||||
int k;
|
||||
|
||||
k = myMultiplyFunction(i, j); // k now contains 6
|
||||
}
|
||||
|
||||
</pre><p>Our function needs to be <em>declared</em> outside any other function, so "myMultiplyFunction()" can go either above or below the "loop()" function.
|
||||
</p>
|
||||
<p class='vspace'></p><p>The entire sketch would then look like this:
|
||||
</p><pre>void setup(){
|
||||
Serial.begin(9600);
|
||||
}
|
||||
|
||||
void loop{
|
||||
int i = 2;
|
||||
int j = 3;
|
||||
int k;
|
||||
|
||||
k = myMultiplyFunction(i, j); // k now contains 6
|
||||
Serial.println(k);
|
||||
delay(500);
|
||||
}
|
||||
|
||||
int myMultiplyFunction(int x, int y){
|
||||
int result;
|
||||
result = x * y;
|
||||
return result;
|
||||
}
|
||||
</pre>
|
||||
<p class='vspace'></p><h4>Another example </h4>
|
||||
<p>This function will read a sensor five times with analogRead() and calculate the average of five readings. It then scales the data to 8 bits (0-255), and inverts it, returning the inverted result.
|
||||
</p>
|
||||
<p class='vspace'></p><pre>int ReadSens_and_Condition(){
|
||||
int i;
|
||||
int sval;
|
||||
|
||||
for (i = 0; i < 5; i++){
|
||||
sval = sval + analogRead(0); // sensor on analog pin 0
|
||||
}
|
||||
|
||||
sval = sval / 5; // average
|
||||
sval = sval / 4; // scale to 8 bits (0 - 255)
|
||||
sval = 255 - sval; // invert output
|
||||
return sval;
|
||||
}
|
||||
</pre>
|
||||
<p class='vspace'></p><p>To call our function we just assign it to a variable.
|
||||
</p>
|
||||
<p class='vspace'></p><pre>int sens;
|
||||
|
||||
sens = ReadSens_and_Condition();
|
||||
|
||||
</pre>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='index.html'>Reference Home</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><em>Corrections, suggestions, and new documentation should be posted to the <a class='urllink' href='http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?board=swbugs' rel='nofollow'>Forum</a>.</em>
|
||||
</p>
|
||||
<p class='vspace'></p><p>The text of the Arduino reference is licensed under a
|
||||
<a class='urllink' href='http://creativecommons.org/licenses/by-sa/3.0/' rel='nofollow'>Creative Commons Attribution-ShareAlike 3.0 License</a>. Code samples in the reference are released into the public domain.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!--PageFooterFmt-->
|
@@ -0,0 +1,54 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - Goto </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
@@ -0,0 +1,42 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - ArduinoBT </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
@@ -0,0 +1,34 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - ArduinoEthernetShield </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
@@ -0,0 +1,42 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - ArduinoLilyPad </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
@@ -0,0 +1,67 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - ArduinoMini </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<h2>Guide to the Arduino Mini</h2>
|
||||
<p>To get started with the Arduino Mini, follow the directions for the regular Arduino on your operating system (<a class='wikilink' href='Guide_Windows.html'>Windows</a>, <a class='wikilink' href='Guide_MacOSX.html'>Mac OS X</a>, <a class='urllink' href='http://www.arduino.cc/playground/Learning/Linux' rel='nofollow'>Linux</a>), with the following modifications:
|
||||
</p>
|
||||
<p class='vspace'></p><ul><li>Connecting the Arduino Mini is a bit more complicated than a regular Arduino board (<a href='#connecting'>see below</a> for instructions and photos).
|
||||
<p class='vspace'></p></li><li>You need to select <strong>Arduino Mini</strong> from the <strong>Tools | Board</strong> menu of the Arduino environment.
|
||||
<p class='vspace'></p></li><li>To upload a new sketch to the Arduino Mini, you need to press the reset button on the board immediately before pressing the upload button in the Arduino environment.
|
||||
</li></ul><p class='vspace'></p><h3>Information about the Arduino Mini</h3>
|
||||
<p>The microcontroller (an <span class='wikiword'>ATmega168</span>) on the Arduino Mini is a physically smaller version of the chip on the USB Arduino boards, with the following small difference:
|
||||
</p>
|
||||
<p class='vspace'></p><ul><li>There are two extra analog inputs on the Mini (8 total). Four of these, however, are not connected to the legs that come on the Arduino Mini, requiring you to solder wires to their holes to use them. Two of these unconnected pins are also used by the Wire library (<span class='wikiword'>I2C</span>), meaning that its use will require soldering as well.
|
||||
</li></ul><p class='vspace'></p><p>Also, the Arduino Mini is more <strong>fragile and easy to break</strong> than a regular Arduino board.
|
||||
</p>
|
||||
<p class='vspace'></p><ul><li>Don't connect more than 9 volts to the +9V pin or reverse the power and ground pins of your power supply, or you might kill the <span class='wikiword'>ATmega168</span> on the Arduino Mini.
|
@@ -0,0 +1,34 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - ArduinoNano </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
@@ -0,0 +1,57 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - ArduinoPro </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<h2>Arduino Pro</h2>
|
||||
<p>The Arduino Pro is intended for advanced users who require flexibility and low-cost. It comes with the minimum of components (no on-board USB or pin headers) to keep the cost down. It's a good choice for a board you want to leave embedded in a project. Please note that there are multiple variants of the board which operate at different voltages and clock speeds. You need to know if you have the 3.3V / 8 <span class='wikiword'>MHz</span> version or the 5V / 16 <span class='wikiword'>MHz</span> version.
|
||||
</p>
|
@@ -0,0 +1,51 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - ArduinoProMini </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
@@ -0,0 +1,111 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - ArduinoXbeeShield </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<h2>Arduino <span class='wikiword'>XBee</span> Shield</h2>
|
||||
<p>The Arduino Xbee shield allows your Arduino board to communicate wirelessly using Zigbee. It was developed in collaboration with <a class='urllink' href='http://www.libelium.com/' rel='nofollow'>Libelium</a>. This documentation describes the use of the shield with the <span class='wikiword'>XBee</span> 802.15.4 module. For the <span class='wikiword'>XBee</span> <span class='wikiword'>ZNet</span> 2.5 ("Series 2") modules, see <a class='urllink' href='http://www.humboldt.edu/~cm19/XBee%20setup.pdf' rel='nofollow'>this configuration guide</a>.
|
||||
</p>
|
||||
<p class='vspace'></p><h3>A Simple Example</h3>
|
||||
<p>You should be able to get two Arduino boards with Xbee shields talking to each other without any configuration, using just the standard Arduino serial commands (described in the <a class='wikilink' href='index.html'>reference</a>).
|
||||
</p>
|
||||
<p class='vspace'></p><p>To upload a sketch to an Arduino board with a Xbee shield, you'll need to put both jumpers on the shield to the "USB" setting (i.e. place them on the two pins closest to the edge of the board) or remove them completely (but be sure not to lose them!). Then, you can upload a sketch normally from the Arduino environment. In this case, upload the <strong>Communication | Physical Pixel</strong> sketch to one of the boards. This sketch instructs the board to turn on the LED attached to pin 13 whenever it receives an 'H' over its serial connection, and turn the LED off when it gets an 'L'. You can test it by connecting to the board with the Arduino serial monitor (be sure it's set at 9600 baud), typing an H, and pressing enter (or clicking send). The LED should turn on. Send an L and the LED should turn off. If nothing happens, you may have an Arduino board that doesn't have a built-in LED on pin 13 (see the <a class='wikilink' href='http://arduino.cc/en/Main/Boards'>board index</a> to check for sure), in this case you'll need to supply your own.
|
||||
</p>
|
||||
<p class='vspace'></p><p>Once you've uploaded the Physical Pixel sketch and made sure that it's working, unplug the first Arduino board from the computer. Switch the jumpers to the Xbee setting (i.e. place each on the center pin and the pin farthest from the edge of the board). Now, you need to upload a sketch to the other board. Make sure its jumpers are in the USB setting. Then upload the following sketch to the board:
|
||||
</p>
|
||||
<p class='vspace'></p><pre>
|
||||
void setup()
|
||||
{
|
||||
Serial.begin(9600);
|
||||
}
|
||||
|
||||
void loop()
|
||||
{
|
||||
Serial.print('H');
|
||||
delay(1000);
|
||||
Serial.print('L');
|
||||
delay(1000);
|
||||
}
|
||||
|
||||
</pre>
|
||||
<p class='vspace'></p><p>When it's finished uploading, you can check that it's working with the Arduino serial monitor. You should see H's and L's arriving one a second. Turn off the serial monitor and unplug the board. Switch the jumpers to the Xbee setting. Now connect both boards to the computer. After a few seconds, you should see the LED on the first board turn on and off, once a second. (This is the LED on the Arduino board itself, not the one on the Xbee shield, which conveys information about the state of the Xbee module.) If so, congratulations, your Arduino boards are communicating wirelessly. This may not seem that exciting when both boards are connected to the same computer, but if you connect them to different computers (or power them with an external power supply - being sure to switch the power jumper on the Arduino board), they should still be able to communicate.
|
||||
</p>
|
||||
<p class='vspace'></p><h3>A Few Notes</h3>
|
||||
<p>You can use any of the standard Arduino serial commands with the Xbee shield. With the shield's jumpers in the Xbee position, the print and println commands will send data over the Xbee shield and the USB connection (i.e. to other Xbee shields and to the computer at the same time). In this configuration, however, the board will only receive data from the Xbee shield not from the USB connection (you'll need to switch the jumpers to allow the board to receive data from the computer).
|
||||
</p>
|
||||
<p class='vspace'></p><p>The Xbee module on the shield is set up to work at 9600 baud by default, so unless you reconfigure it, you'll need to make sure you're passing 9600 to the Serial.begin() command in your sketch.
|
||||
</p>
|
||||
<p class='vspace'></p><p>To allow your computer to communicate directly with the Xbee shield, connect it to an Arduino board whose microcontroller has been removed and place its jumpers in the USB configuration. Then you can send data to and receive data from the Xbee module from any terminal program. This allows you, for example, to see the data that the module is receiving from other Xbee shields (e.g. to collect sensor data wirelessly from a number of locations).
|
||||
</p>
|
||||
<p class='vspace'></p><h3>Configuring the Xbee Module</h3>
|
||||
<p>You can configure the Xbee module from code running on the Arduino board or from software on the computer. To configure it from the Arduino board, you'll need to have the jumpers in the Xbee position. To configure it from the computer, you'll need to have the jumpers in the USB configuration and have removed the microncontroller from your Arduino board.
|
||||
</p>
|
||||
<p class='vspace'></p><p>To get the module into configuration mode, you need to send it three plus signs: +++ and there needs to be at least one second before and after during which you send no other character to the module. Note that this includes newlines or carriage return characters. Thus, if you're trying to configure the module from the computer, you need to make sure your terminal software is configured to send characters as you type them, without waiting for you to press enter. Otherwise, it will send the plus signs immediately followed by a newline (i.e. you won't get the needed one second delay after the +++). If you successfully enter configuration mode, the module will send back the two characters 'OK', followed by a carriage return.
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
<table width="60%"><tr><td width="50%" valign='top'> Send Command
|
||||
</td><td width="50%" valign='top'> Expected Response
|
||||
</td></tr><tr><td valign='top'> <code>+++</code>
|
||||
</td><td valign='top'> <code>OK</code><em><CR></em>
|
||||
</td></tr></table>
|
||||
<p class='vspace'></p><p>Once in configuration mode, you can send AT commands to the module. Command strings have the form <span class='wikiword'>ATxx</span> (where xx is the name of a setting). To read the current value of the setting, send the command string followed by a carriage return. To write a new value to the setting, send the command string, immediately followed by the new setting (with no spaces or newlines in-between), followed by a carriage return. For example, to read the network ID of the module (which determines which other Xbee modules it will communicate with), use the <em>'ATID</em> command:
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
<table width="60%"><tr><td width="50%" valign='top'> Send Command
|
||||
</td><td width="50%" valign='top'> Expected Response
|
||||
</td></tr><tr><td valign='top'> <code>ATID</code><em><enter></em>
|
||||
</td><td valign='top'> <code>3332</code><em><CR></em>
|
||||
</td></tr></table>
|
||||
<p class='vspace'></p><p>To change the network ID of the module:
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
<table width="60%"><tr><td width="50%" valign='top'> Send Command
|
@@ -0,0 +1,82 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - Board </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav">
|
||||
<p><a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='http://www.arduino.cc/en/Tutorial/HomePage'>Tutorials</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='index.html'>Reference</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='http://www.arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='http://www.arduino.cc/en/Main/Software'>Software</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='urllink' href='http://www.arduino.cc/blog/' rel='nofollow'>Blog</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='urllink' href='http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl' rel='nofollow'>Forum</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='urllink' href='http://www.arduino.cc/playground/' rel='nofollow'>Playground</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='urllink' href='http://www.arduino.cc/playground/Projects/ArduinoUsers' rel='nofollow'>Exhibition</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='http://www.arduino.cc/en/Hacking/HomePage'>Hacking</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='http://www.arduino.cc/en/Main/Buy'>Buy</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><strong>Guide</strong> <a class='wikilink' href='Guide_index.html'>Contents</a> | <a class='wikilink' href='Guide_Introduction.html'>Introduction</a> | How To: <a class='wikilink' href='Guide_Windows.html'>Windows</a>, <a class='wikilink' href='Guide_MacOSX.html'>Mac OS X</a>, <a class='urllink' href='http://www.arduino.cc/playground/Learning/Linux' rel='nofollow'>Linux</a>; <a class='wikilink' href='Guide_ArduinoMini.html'>Arduino Mini</a>, <a class='wikilink' href='Guide_ArduinoBT.html'>Arduino BT</a>, <a class='wikilink' href='Guide_ArduinoLilyPad.html'>LilyPad Arduino</a>; <a class='wikilink' href='Guide_ArduinoXbeeShield.html'>Xbee shield</a> | <a class='wikilink' href='Guide_Troubleshooting.html'>Troubleshooting</a> | <a class='selflink' href='Guide_Board.html'>Board</a> | <a class='wikilink' href='Guide_Environment.html'>Environment</a>
|
||||
</p><h2>Introduction to the Arduino Board</h2>
|
||||
<p>Looking at the board from the top down, this is an outline of what you will see (parts of the board you might interact with in the course of normal use are highlighted):
|
||||
</p>
|
||||
<p class='vspace'></p><div><img src='http://www.arduino.cc/en/uploads/Guide/arduino_board.png' alt='' title='' /></div>
|
||||
<p class='vspace'></p><p>Starting clockwise from the top center:
|
||||
</p>
|
||||
<p class='vspace'></p><ul><li>Analog Reference pin (orange)
|
||||
</li><li>Digital Ground (light green)
|
||||
</li><li>Digital Pins 2-13 (green)
|
||||
</li><li>Digital Pins 0-1/Serial In/Out - TX/RX (dark green) - <em>These pins cannot be used for digital i/o (<strong>digitalRead</strong> and <strong>digitalWrite</strong>) if you are also using serial communication (e.g. <strong>Serial.begin</strong>)</em>.
|
||||
</li><li>Reset Button - S1 (dark blue)
|
||||
</li><li>In-circuit Serial Programmer (blue-green)
|
||||
</li><li>Analog In Pins 0-5 (light blue)
|
||||
</li><li>Power and Ground Pins (power: orange, grounds: light orange)
|
||||
</li><li>External Power Supply In (9-12VDC) - X1 (pink)
|
||||
</li><li>Toggles External Power and USB Power (place jumper on two pins closest to desired supply) - <span class='wikiword'>SV1</span> (purple)
|
||||
</li><li>USB (used for uploading sketches to the board and for serial communication between the board and the computer; can be used to power the board) (yellow)
|
||||
</li></ul><p class='vspace'></p><p>The text of the Arduino getting started guide is licensed under a
|
||||
<a class='urllink' href='http://creativecommons.org/licenses/by-sa/3.0/' rel='nofollow'>Creative Commons Attribution-ShareAlike 3.0 License</a>. Code samples in the guide are released into the public domain.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!--PageFooterFmt-->
|
@@ -0,0 +1,135 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - Environment </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<h2>Arduino Development Environment</h2>
|
||||
<p>The Arduino development environment contains a text editor for writing code, a message area, a text console, a toolbar with buttons for common functions, and a series of menus. It connects to the Arduino hardware to upload programs and communicate with them.
|
||||
</p>
|
||||
<p class='vspace'></p><p>Software written using Arduino are called sketches. These sketches are written in the text editor. It has features for cutting/pasting and for searching/replacing text. The message area gives feedback while saving and exporting and also displays errors. The console displays text output by the Arduino environment including complete error messages and other information. The toolbar buttons allow you to verify and upload programs, create, open, and save sketches, and open the serial monitor:
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
<p class='vspace'></p><table width='100%'><tr><td width='40' valign='top'>
|
||||
<p class='vspace'></p><div><img src='http://arduino.cc/en/uploads/Guide/play.gif' alt='' title='' /></div>
|
||||
<p class='vspace'></p></td><td valign='top'>
|
||||
<p class='vspace'></p><p><em>Verify/Compile</em> <br clear='all' /> Checks your code for errors.
|
||||
</p>
|
||||
<p class='vspace'></p></td></tr><tr><td valign='top'>
|
||||
<p class='vspace'></p><div><img src='http://arduino.cc/en/uploads/Guide/stop.gif' alt='' title='' /></div>
|
||||
<p class='vspace'></p></td><td valign='top'>
|
||||
<p class='vspace'></p><p><em>Stop</em> <br clear='all' /> Stops the serial monitor, or unhighlight other buttons.
|
||||
</p>
|
||||
<p class='vspace'></p></td></tr><tr><td valign='top'>
|
||||
<p class='vspace'></p><div><img src='http://arduino.cc/en/uploads/Guide/new.gif' alt='' title='' /></div>
|
||||
<p class='vspace'></p></td><td valign='top'>
|
||||
<p class='vspace'></p><p><em>New</em> <br clear='all' /> Creates a new sketch.
|
||||
</p>
|
||||
<p class='vspace'></p></td></tr><tr><td valign='top'>
|
||||
<p class='vspace'></p><div><img src='http://arduino.cc/en/uploads/Guide/open.gif' alt='' title='' /></div>
|
||||
<p class='vspace'></p></td><td valign='top'>
|
||||
<p class='vspace'></p><p><em>Open</em> <br clear='all' /> Presents a menu of all the sketches in your sketchbook. Clicking one will open it within the current window.
|
||||
</p>
|
||||
<p class='vspace'></p><p>Note: due to a bug in Java, this menu doesn't scroll; if you need to open a sketch late in the list, use the <strong>File | Sketchbook</strong> menu instead.
|
||||
</p>
|
||||
<p class='vspace'></p></td></tr><tr><td valign='top'>
|
||||
<p class='vspace'></p><div><img src='http://arduino.cc/en/uploads/Guide/save.gif' alt='' title='' /></div>
|
||||
<p class='vspace'></p></td><td valign='top'>
|
||||
<p class='vspace'></p><p><em>Save</em> <br clear='all' /> Saves your sketch.
|
||||
</p>
|
||||
<p class='vspace'></p></td></tr><tr><td valign='top'>
|
||||
<p class='vspace'></p><div><img src='http://arduino.cc/en/uploads/Guide/export.gif' alt='' title='' /></div>
|
||||
<p class='vspace'></p></td><td valign='top'>
|
||||
<p class='vspace'></p><p><em>Upload to I/O Board</em> <br clear='all' /> Compiles your code and uploads it to the Arduino I/O board. See <a href='#uploading'>uploading</a> below for details.
|
||||
</p>
|
||||
<p class='vspace'></p></td></tr><tr><td valign='top'>
|
||||
<p class='vspace'></p><div><img src='http://arduino.cc/en/uploads/Guide/serial_monitor.gif' alt='' title='' /></div>
|
||||
<p class='vspace'></p></td><td valign='top'>
|
||||
<p class='vspace'></p><p><em>Serial Monitor</em> <br clear='all' /> Opens the <a href='#serialmonitor'>serial monitor</a>.
|
||||
</p>
|
||||
<p class='vspace'></p></td></tr></table>
|
||||
<p class='vspace'></p><p>Additional commands are found within the five menus: File, Edit, Sketch, Tools, Help. The menus are context sensitive which means only those items relevant to the work currently being carried out are available.
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Edit</h4>
|
||||
<ul><li><em>Copy for Discourse</em> <br clear='all' /> Copies the code of your sketch to the clipboard in a forum suitable for posting to the forum, complete with syntax coloring.
|
||||
<p class='vspace'></p></li><li><em>Copy as HTML</em> <br clear='all' /> Copies the code of your sketch to the clipboard as HTML, suitable for embedding in web pages.
|
||||
</li></ul><p class='vspace'></p><h4>Sketch</h4>
|
||||
<ul><li><em>Verify/Compile</em> <br clear='all' /> Checks your sketch for errors.
|
||||
<p class='vspace'></p></li><li><em>Import Library</em> <br clear='all' /> Adds a library to your sketch by inserting #include statements at the code of your code. For more details, see <a href='#libraries'>libraries</a> below.
|
||||
<p class='vspace'></p></li><li><em>Show Sketch Folder</em> <br clear='all' /> Opens the sketch folder on the desktop.
|
||||
<p class='vspace'></p></li><li><em>Add File...</em> <br clear='all' /> Adds a source file to the sketch (it will be copied from its current location). The new file appears in a new tab in the sketch window. Files can be removed from the sketch using the tab menu.
|
||||
</li></ul><p class='vspace'></p><h4>Tools</h4>
|
||||
<ul><li><em>Auto Format</em> <br clear='all' /> This formats your code nicely: i.e. indents it so that opening and closing curly braces line up, and that the statements instead curly braces are indented more.
|
||||
<p class='vspace'></p></li><li><em>Board</em> <br clear='all' /> Select the board that you're using. See below for <a href='#boards'>descriptions of the various boards</a>.
|
||||
<p class='vspace'></p></li><li><em>Serial Port</em> <br clear='all' /> This menu contains all the serial devices (real or virtual) on your machine. It should automatically refresh every time you open the top-level tools menu.
|
||||
<p class='vspace'></p></li><li><em>Burn Bootloader</em> <br clear='all' /> The items in this menu allow you to burn a <a class='wikilink' href='http://arduino.cc/en/Tutorial/Bootloader'>bootloader</a> onto the microcontroller on an Arduino board. This is not required for normal use of an Arduino board but is useful if you purchase a new <span class='wikiword'>ATmega</span> (which normally come without a bootloader). Ensure that you've selected the correct board from the <strong>Boards</strong> menu before burning the bootloader. When using an AVR ISP, you'll need to select the item corresponding to your programmer from the <strong>Serial Port</strong> menu.
|
||||
</li></ul><p class='vspace'></p><p><a name='sketchbook' id='sketchbook'></a>
|
||||
</p><h3>Sketchbook</h3>
|
||||
<p>The Arduino environment includes the concept of a sketchbook: a standard place to store your programs (or sketches). The sketches in your sketchbook can be opened from the <strong>File > Sketchbook</strong> menu or from the <strong>Open</strong> button on the toolbar. The first time you run the Arduino software, it will automatically create a directory for your sketchbook. You can view or change the location of the sketchbook location from with the <strong>Preferences</strong> dialog.
|
||||
</p>
|
||||
<p class='vspace'></p><h3>Tabs, Multiple Files, and Compilation</h3>
|
||||
<p>Allows you to manage sketches with more than one file (each of which appears in its own tab). These can be normal Arduino code files (no extension), C files (.c extension), C++ files (.cpp), or header files (.h).
|
||||
</p>
|
||||
<p class='vspace'></p><p><a name='uploading' id='uploading'></a>
|
||||
</p><h3>Uploading</h3>
|
||||
<p>Before uploading your sketch, you need to select the correct items from the <strong>Tools > Board</strong> and <strong>Tools > Serial Port</strong> menus. The <a href='#boards'>boards</a> are described below. On the Mac, the serial port is probably something like <strong>/dev/tty.usbserial-1B1</strong> (for a USB board), or <strong>/dev/<span class='wikiword'>tty.USA19QW1b1P1</span>.1</strong> (for a serial board connected with a Keyspan USB-to-Serial adapter). On Windows, it's probably <strong><span class='wikiword'>COM1</span></strong> or <strong><span class='wikiword'>COM2</span></strong> (for a serial board) or <strong><span class='wikiword'>COM4</span></strong>, <strong><span class='wikiword'>COM5</span></strong>, <strong><span class='wikiword'>COM7</span></strong>, or higher (for a USB board) - to find out, you look for USB serial device in the ports section of the Windows Device Manager. On Linux, it should be <strong>/dev/ttyUSB0</strong>, <strong>/dev/ttyUSB1</strong> or similar.
|
||||
</p>
|
||||
<p class='vspace'></p><p>Once you've selected the correct serial port and board, press the upload button in the toolbar or select the <strong>Upload to I/O Board</strong> item from the <strong>File</strong> menu. Current Arduino boards will reset automatically and begin the upload. With older boards that lack auto-reset, you'll need to press the reset button on the board just before starting the upload. On most boards, you'll see the RX and TX <span class='wikiword'>LEDs</span> blink as the sketch is uploaded. The Arduino environment will display a message when the upload is complete, or show an error.
|
||||
</p>
|
||||
<p class='vspace'></p><p>When you upload a sketch, you're using the Arduino bootloader, a small program that has been loaded on to the microcontroller on your board. It allows you to upload code without using any additional hardware. The bootloader is active for a few seconds when the board resets; then it starts whichever sketch was most recently uploaded to the microcontroller. The bootloader will blink the on-board (pin 13) LED when it starts (i.e. when the board resets).
|
||||
</p>
|
||||
<p class='vspace'></p><p><a name='libraries' id='libraries'></a>
|
||||
</p><h3>Libraries</h3>
|
||||
<p>Libraries provide extra functionality for use in sketches, e.g. working with hardware or manipulating data. To use a library in a sketch, select it from the <strong>Sketch > Import Library</strong> menu. This will insert one or more <strong>#include</strong> statements at the top of the sketch and compile the library with your sketch. Because libraries are uploaded to the board with your sketch, they increase the amount of space it takes up. If a sketch no longer needs a library, simply delete its <strong>#include</strong> statements from the top of your code.
|
||||
</p>
|
||||
<p class='vspace'></p><p>There is a <a class='wikilink' href='Libraries.html'>list of libraries</a> in the reference. Some libraries are included with the Arduino software. Others can be downloaded from a variety of sources. To install these third-party libraries, create a directory called <strong>libraries</strong> within your <a href='#sketchbook'>sketchbook directory</a>. Then unzip the library there. For example, to install the <span class='wikiword'>DateTime</span> library, its files should be in the <strong>/<span class='wikiword'>libraries/DateTime</span></strong> sub-folder of your sketchbook folder.
|
||||
</p>
|
||||
<p class='vspace'></p><p>To write your own library, see <a class='wikilink' href='http://arduino.cc/en/Hacking/LibraryTutorial'>this tutorial</a>.
|
@@ -0,0 +1,61 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - Guide </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc/">Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav">
|
||||
<p><a class='wikilink' href='Guide_index.html'>Guide</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='http://www.arduino.cc/en/Tutorial/HomePage'>Tutorials</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='index.html'>Reference</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='http://www.arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='http://www.arduino.cc/en/Main/Software'>Software</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='urllink' href='http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl' rel='nofollow'>Forum</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='urllink' href='http://www.arduino.cc/playground/' rel='nofollow'>Playground</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='urllink' href='http://www.arduino.cc/playground/Projects/ArduinoUsers' rel='nofollow'>Exhibition</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='http://www.arduino.cc/en/Hacking/HomePage'>Hacking</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='http://www.arduino.cc/en/Main/FAQ'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='http://www.arduino.cc/en/Main/Buy'>Buy</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><a class='wikilink' href='Guide_index.html'>Introduction</a> | How To: <a class='wikilink' href='Guide_Windows.html'>Windows</a>, <a class='wikilink' href='Guide_MacOSX.html'>Mac OS X</a>, <a class='urllink' href='http://www.arduino.cc/playground/Learning/Linux' rel='nofollow'>Linux</a>; <a class='wikilink' href='Guide_ArduinoMini.html'>Arduino Mini</a>, <a class='wikilink' href='Guide_ArduinoBT.html'>Arduino BT</a> | <a class='wikilink' href='Guide_Troubleshooting.html'>Troubleshooting</a> | <a class='wikilink' href='Guide_Board.html'>Board</a> | <a class='wikilink' href='Guide_Environment.html'>Environment</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!--PageFooterFmt-->
|
@@ -0,0 +1,81 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - Guide </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc/">Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav">
|
||||
<p><a class='selflink' href='Guide_index.html'>Guide</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='http://www.arduino.cc/en/Tutorial/HomePage'>Tutorials</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='index.html'>Reference</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='http://www.arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='http://www.arduino.cc/en/Main/Software'>Software</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='urllink' href='http://www.arduino.cc/blog/' rel='nofollow'>Blog</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='urllink' href='http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl' rel='nofollow'>Forum</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='urllink' href='http://www.arduino.cc/playground/' rel='nofollow'>Playground</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='urllink' href='http://www.arduino.cc/playground/Projects/ArduinoUsers' rel='nofollow'>Exhibition</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='http://www.arduino.cc/en/Hacking/HomePage'>Hacking</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='http://www.arduino.cc/en/Main/FAQ'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='http://www.arduino.cc/en/Main/Buy'>Buy</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><strong>Guide</strong> <a class='selflink' href='Guide_index.html'>Contents</a> | <a class='wikilink' href='Guide_Introduction.html'>Introduction</a> | How To: <a class='wikilink' href='Guide_Windows.html'>Windows</a>, <a class='wikilink' href='Guide_MacOSX.html'>Mac OS X</a>, <a class='urllink' href='http://www.arduino.cc/playground/Learning/Linux' rel='nofollow'>Linux</a>; <a class='wikilink' href='Guide_ArduinoMini.html'>Arduino Mini</a>, <a class='wikilink' href='Guide_ArduinoBT.html'>Arduino BT</a>, <a class='wikilink' href='Guide_ArduinoLilyPad.html'>LilyPad Arduino</a>; <a class='wikilink' href='Guide_ArduinoXbeeShield.html'>Xbee shield</a> | <a class='wikilink' href='Guide_Troubleshooting.html'>Troubleshooting</a> | <a class='wikilink' href='Guide_Board.html'>Board</a> | <a class='wikilink' href='Guide_Environment.html'>Environment</a>
|
||||
</p><h2>Guide to Arduino</h2>
|
||||
<table width='90%' border='0' cellpadding='5' cellspacing='0'><tr><td width='50%' valign='top'>
|
||||
<p class='vspace'></p><h3>In This Guide</h3>
|
||||
<p>This guide tell you everything you need to get started with Arduino. It consists of the following pages:
|
||||
</p>
|
||||
<p class='vspace'></p><ul><li><a class='wikilink' href='Guide_Introduction.html'>Introduction</a>: an explanation of what Arduino is and why you'd want to use it.
|
||||
</li><li>How To (<a class='wikilink' href='Guide_Windows.html'>Windows</a>, <a class='wikilink' href='Guide_MacOSX.html'>Mac OS X</a>, <a class='urllink' href='http://www.arduino.cc/playground/Learning/Linux' rel='nofollow'>Linux</a>; <a class='wikilink' href='Guide_ArduinoMini.html'>Arduino Mini</a>, <a class='wikilink' href='Guide_ArduinoBT.html'>Arduino BT</a>, <a class='wikilink' href='Guide_ArduinoLilyPad.html'>LilyPad Arduino</a>; <a class='wikilink' href='Guide_ArduinoXbeeShield.html'>Xbee shield</a>): step-by-step instructions on getting your first Arduino program working.
|
||||
</li><li><a class='wikilink' href='Guide_Troubleshooting.html'>Troubleshooting</a>: what to do if things don't work.
|
||||
</li><li><a class='wikilink' href='Guide_Board.html'>Board</a>: description of the Arduino board and its parts.
|
||||
</li><li><a class='wikilink' href='Guide_Environment.html'>Environment</a>: description of the Arduino development environment and its parts.
|
||||
</li></ul><p class='vspace'></p><h3>Elsewhere on the Arduino website</h3>
|
||||
<ul><li><a class='wikilink' href='http://www.arduino.cc/en/Booklet/HomePage'>Arduino booklet</a>: an introduction to physical computing, electronics, and Arduino.
|
||||
</li></ul><p class='vspace'></p></td><td width='50%' valign='top'>
|
||||
<p class='vspace'></p><h3>External Resources</h3>
|
||||
<ul><li><a class='urllink' href='http://todbot.com/blog/spookyarduino/' rel='nofollow'>Course guides</a>: Longer documents introducing Arduino: <a class='urllink' href='http://todbot.com/blog/wp-content/uploads/2006/10/arduino_spooky_projects_class1.pdf' rel='nofollow'>class 1 (getting started)</a>, <a class='urllink' href='http://todbot.com/blog/wp-content/uploads/2006/10/arduino_spooky_projects_class2.pdf' rel='nofollow'>class 2 (input and sensors)</a>, <a class='urllink' href='http://todbot.com/blog/wp-content/uploads/2006/10/arduino_spooky_projects_class3.pdf' rel='nofollow'>class 3 (communication, servos, and pwm)</a>, <a class='urllink' href='http://todbot.com/blog/wp-content/uploads/2006/10/arduino_spooky_projects_class4.pdf' rel='nofollow'>class 4 (piezo sound & sensors, arduino+processing, stand-alone operation)</a>.
|
||||
<p class='vspace'></p></li><li><a class='urllink' href='http://wiring.org.co/reference/electronics/index.html' rel='nofollow'>Wiring electronics reference</a>: circuit diagrams for connecting a variety of basic electronic components.
|
||||
<p class='vspace'></p></li><li><a class='urllink' href='http://wiring.org.co/learning/tutorials/diagrams.html' rel='nofollow'>Schematics to circuits</a>: from Wiring, a guide to transforming circuit diagrams into physical circuits.
|
||||
<p class='vspace'></p></li><li><a class='urllink' href='http://tigoe.net/pcomp/' rel='nofollow'>Tom Igoe's Physical Computing Site</a>: lots of information on electronics, microcontrollers, sensors, actuators, books, etc.
|
||||
</li></ul><p class='vspace'></p></td></tr></table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!--PageFooterFmt-->
|
@@ -0,0 +1,40 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - Introduction </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
@@ -0,0 +1,76 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - MacOSX </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<h2>Getting Started w/ Arduino on Mac OS X</h2>
|
||||
<p><em>This document explains how to connect your Arduino board to the computer and upload your first sketch.</em>
|
||||
</p>
|
||||
<p class='vspace'></p><div class='toc'><p><a name='toc' id='toc'></a><b>On this page...</b> (<a id="tocidtog" href="javascript:toggle('tocid');">hide</a>)</p><ul class='toc' id='tocid'><li><a href='#toc1'>1 | Get an Arduino board and USB cable</a></li><li><a href='#toc2'>2 | Download the Arduino environment</a></li><li><a href='#toc3'>3 | Install the Application and USB drivers</a></li><li><a href='#toc4'>4 | Connect the board</a></li><li><a href='#toc5'>5 | Launch the Arduino application</a></li><li><a href='#toc6'>6 | Open the blink example</a></li><li><a href='#toc7'>7 | Select your board</a></li><li><a href='#toc8'>8 | Select your serial port</a></li><li><a href='#toc9'>9 | Upload the program</a></li></ul></div>
|
||||
<p class='vspace'></p><h3><a name='toc1' id='toc1'></a>1 | Get an Arduino board and USB cable</h3>
|
||||
<p>In this tutorial, we assume you're using an <a class='wikilink' href='http://arduino.cc/en/Main/ArduinoBoardDuemilanove'>Arduino Duemilanove</a>, <a class='wikilink' href='http://arduino.cc/en/Main/ArduinoBoardNano'>Nano</a>, or <a class='wikilink' href='http://arduino.cc/en/Main/ArduinoBoardDiecimila'>Diecimila</a>. If you have another board, read the corresponding page in this getting started guide.
|
||||
</p>
|
||||
<p class='vspace'></p><p>You also need a standard USB cable (A plug to B plug): the kind you would connect to a USB printer, for example. (For the Arduino Nano, you'll need an A to Mini-B cable instead.)
|
||||
</p>
|
||||
<p class='vspace'></p><div><img src='http://arduino.cc/en/uploads/Guide/ArduinoDuemilanove.png' alt='' title='' /> <img src='http://arduino.cc/en/uploads/Guide/USBCable.jpg' alt='' title='' /></div>
|
||||
<p class='vspace'></p><p><em>Photos by <span class='wikiword'>SparkFun</span> Electronics.</em>
|
||||
</p>
|
||||
<p class='vspace'></p><h3><a name='toc2' id='toc2'></a>2 | Download the Arduino environment</h3>
|
||||
<p>Get the latest version from the <a class='wikilink' href='http://arduino.cc/en/Main/Software'>download page</a>.
|
||||
</p>
|
||||
<p class='vspace'></p><p>The disk image (.dmg) should mount automatically. If it doesn't, double-click it. It should look like the following image.
|
||||
</p>
|
||||
<p class='vspace'></p><div><img src='http://arduino.cc/en/uploads/Guide/ArduinoDiskImage.png' alt='' title='' /></div>
|
||||
<p class='vspace'></p><h3><a name='toc3' id='toc3'></a>3 | Install the Application and USB drivers</h3>
|
||||
<p>Copy the Arduino application into the Applications folder (or elsewhere on your computer).
|
||||
</p>
|
||||
<p class='vspace'></p><p>If this is your first time using an Arduino with your computer, you will need to install the drivers for the FTDI chip on the board. Double-click the <strong><span class='wikiword'>FTDIUSBSerialDriver</span>_10_4_10_5_10_6.mpkg</strong> icon and follow the instructions in the installer. You'll need to restart your computer after installing the drivers. (The latest version of the drivers can be found on the <a class='urllink' href='http://www.ftdichip.com/Drivers/VCP.htm' rel='nofollow'>FTDI website</a>.)
|
@@ -0,0 +1,135 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - RecentChanges </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc/">Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav">
|
||||
<p><a class='wikilink' href='Guide_index.html'>Guide</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='http://www.arduino.cc/en/Tutorial/HomePage'>Tutorials</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='index.html'>Reference</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='http://www.arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='http://www.arduino.cc/en/Main/Software'>Software</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='urllink' href='http://www.arduino.cc/blog/' rel='nofollow'>Blog</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='urllink' href='http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl' rel='nofollow'>Forum</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='urllink' href='http://www.arduino.cc/playground/' rel='nofollow'>Playground</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='urllink' href='http://www.arduino.cc/playground/Projects/ArduinoUsers' rel='nofollow'>Exhibition</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='http://www.arduino.cc/en/Hacking/HomePage'>Hacking</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='http://www.arduino.cc/en/Main/FAQ'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='http://www.arduino.cc/en/Main/Buy'>Buy</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><strong>Guide</strong> <a class='wikilink' href='Guide_index.html'>Contents</a> | <a class='wikilink' href='Guide_Introduction.html'>Introduction</a> | How To: <a class='wikilink' href='Guide_Windows.html'>Windows</a>, <a class='wikilink' href='Guide_MacOSX.html'>Mac OS X</a>, <a class='urllink' href='http://www.arduino.cc/playground/Learning/Linux' rel='nofollow'>Linux</a>; <a class='wikilink' href='Guide_ArduinoMini.html'>Arduino Mini</a>, <a class='wikilink' href='Guide_ArduinoBT.html'>Arduino BT</a>, <a class='wikilink' href='Guide_ArduinoLilyPad.html'>LilyPad Arduino</a>; <a class='wikilink' href='Guide_ArduinoXbeeShield.html'>Xbee shield</a> | <a class='wikilink' href='Guide_Troubleshooting.html'>Troubleshooting</a> | <a class='wikilink' href='Guide_Board.html'>Board</a> | <a class='wikilink' href='Guide_Environment.html'>Environment</a>
|
||||
</p><ul><li><a class='wikilink' href='Guide_Troubleshooting.html'>Troubleshooting</a> . . . October 06, 2007, at 02:14 PM by <a class='createlinktext' rel='nofollow'
|
||||
href='http://www.arduino.cc/en/DavidA/Mellis?action=edit'>David A. Mellis</a><a rel='nofollow'
|
||||
class='createlink' href='http://www.arduino.cc/en/DavidA/Mellis?action=edit'>?</a>:
|
||||
</li><li><a class='wikilink' href='Guide_GroupHeader.html'>GroupHeader</a> . . . October 04, 2007, at 09:53 AM by <a class='createlinktext' rel='nofollow'
|
||||
href='http://www.arduino.cc/en/DavidA/Mellis?action=edit'>David A. Mellis</a><a rel='nofollow'
|
||||
class='createlink' href='http://www.arduino.cc/en/DavidA/Mellis?action=edit'>?</a>:
|
||||
</li><li><a class='wikilink' href='Guide_index.html'>HomePage</a> . . . October 04, 2007, at 09:53 AM by <a class='createlinktext' rel='nofollow'
|
||||
href='http://www.arduino.cc/en/DavidA/Mellis?action=edit'>David A. Mellis</a><a rel='nofollow'
|
||||
class='createlink' href='http://www.arduino.cc/en/DavidA/Mellis?action=edit'>?</a>: adding link to lilypad guide
|
||||
</li><li><a class='wikilink' href='Guide_ArduinoLilyPad.html'>ArduinoLilyPad</a> . . . October 03, 2007, at 11:51 AM by <a class='createlinktext' rel='nofollow'
|
||||
href='http://www.arduino.cc/en/Profiles/LeahBuechley?action=edit'>Leah Buechley</a><a rel='nofollow'
|
||||
class='createlink' href='http://www.arduino.cc/en/Profiles/LeahBuechley?action=edit'>?</a>:
|
||||
</li><li><a class='wikilink' href='Guide_Introduction.html'>Introduction</a> . . . September 01, 2007, at 12:01 AM by <a class='createlinktext' rel='nofollow'
|
||||
href='http://www.arduino.cc/en/DavidA/Mellis?action=edit'>David A. Mellis</a><a rel='nofollow'
|
||||
class='createlink' href='http://www.arduino.cc/en/DavidA/Mellis?action=edit'>?</a>:
|
||||
</li><li><a class='wikilink' href='Guide_HowtoExample.html'>HowtoExample</a> . . . August 17, 2007, at 09:00 AM by <a class='createlinktext' rel='nofollow'
|
||||
href='http://www.arduino.cc/en/DavidA/Mellis?action=edit'>David A. Mellis</a><a rel='nofollow'
|
||||
class='createlink' href='http://www.arduino.cc/en/DavidA/Mellis?action=edit'>?</a>:
|
||||
</li><li><a class='wikilink' href='Guide_ArduinoXbeeShield.html'>ArduinoXbeeShield</a> . . . August 15, 2007, at 06:47 PM by <a class='createlinktext' rel='nofollow'
|
||||
href='http://www.arduino.cc/en/DavidA/Mellis?action=edit'>David A. Mellis</a><a rel='nofollow'
|
||||
class='createlink' href='http://www.arduino.cc/en/DavidA/Mellis?action=edit'>?</a>:
|
||||
</li><li><a class='wikilink' href='Guide_Environment.html'>Environment</a> . . . August 07, 2007, at 11:39 AM by <a class='createlinktext' rel='nofollow'
|
||||
href='http://www.arduino.cc/en/DavidA/Mellis?action=edit'>David A. Mellis</a><a rel='nofollow'
|
||||
class='createlink' href='http://www.arduino.cc/en/DavidA/Mellis?action=edit'>?</a>:
|
||||
</li><li><a class='wikilink' href='Guide_HowtoLED.html'>HowtoLED</a> . . . August 07, 2007, at 11:37 AM by <a class='createlinktext' rel='nofollow'
|
||||
href='http://www.arduino.cc/en/DavidA/Mellis?action=edit'>David A. Mellis</a><a rel='nofollow'
|
||||
class='createlink' href='http://www.arduino.cc/en/DavidA/Mellis?action=edit'>?</a>:
|
||||
</li><li><a class='wikilink' href='Guide_HowtoUpload.html'>HowtoUpload</a> . . . August 07, 2007, at 11:34 AM by <a class='createlinktext' rel='nofollow'
|
||||
href='http://www.arduino.cc/en/DavidA/Mellis?action=edit'>David A. Mellis</a><a rel='nofollow'
|
||||
class='createlink' href='http://www.arduino.cc/en/DavidA/Mellis?action=edit'>?</a>:
|
||||
</li><li><a class='wikilink' href='Guide_HowtoConnect.html'>HowtoConnect</a> . . . August 07, 2007, at 11:22 AM by <a class='createlinktext' rel='nofollow'
|
||||
href='http://www.arduino.cc/en/DavidA/Mellis?action=edit'>David A. Mellis</a><a rel='nofollow'
|
||||
class='createlink' href='http://www.arduino.cc/en/DavidA/Mellis?action=edit'>?</a>: specifying voltage range for usb boards
|
||||
</li><li><a class='wikilink' href='Guide_MacOSX.html'>MacOSX</a> . . . August 06, 2007, at 09:45 PM by <a class='createlinktext' rel='nofollow'
|
||||
href='http://www.arduino.cc/en/DavidA/Mellis?action=edit'>David A. Mellis</a><a rel='nofollow'
|
||||
class='createlink' href='http://www.arduino.cc/en/DavidA/Mellis?action=edit'>?</a>:
|
||||
</li><li><a class='wikilink' href='Guide_Windows.html'>Windows</a> . . . August 06, 2007, at 09:44 PM by <a class='createlinktext' rel='nofollow'
|
||||
href='http://www.arduino.cc/en/DavidA/Mellis?action=edit'>David A. Mellis</a><a rel='nofollow'
|
||||
class='createlink' href='http://www.arduino.cc/en/DavidA/Mellis?action=edit'>?</a>: updating software version to 0009.
|
||||
</li><li><a class='wikilink' href='Guide_Troubleshooting2.html'>Troubleshooting2</a> . . . July 18, 2007, at 10:05 AM by <a class='createlinktext' rel='nofollow'
|
||||
href='http://www.arduino.cc/en/DavidA/Mellis?action=edit'>David A. Mellis</a><a rel='nofollow'
|
||||
class='createlink' href='http://www.arduino.cc/en/DavidA/Mellis?action=edit'>?</a>:
|
||||
</li><li><a class='wikilink' href='Guide_ArduinoBT.html'>ArduinoBT</a> . . . June 15, 2007, at 06:01 PM by <a class='createlinktext' rel='nofollow'
|
||||
href='http://www.arduino.cc/en/DavidA/Mellis?action=edit'>David A. Mellis</a><a rel='nofollow'
|
||||
class='createlink' href='http://www.arduino.cc/en/DavidA/Mellis?action=edit'>?</a>:
|
||||
</li><li><a class='wikilink' href='Guide_ArduinoMini.html'>ArduinoMini</a> . . . June 15, 2007, at 05:52 PM by <a class='createlinktext' rel='nofollow'
|
||||
href='http://www.arduino.cc/en/DavidA/Mellis?action=edit'>David A. Mellis</a><a rel='nofollow'
|
||||
class='createlink' href='http://www.arduino.cc/en/DavidA/Mellis?action=edit'>?</a>:
|
||||
</li><li><a class='wikilink' href='Guide_HowtoSteps.html'>HowtoSteps</a> . . . March 03, 2007, at 03:13 PM by <a class='createlinktext' rel='nofollow'
|
||||
href='http://www.arduino.cc/en/DavidA/Mellis?action=edit'>David A. Mellis</a><a rel='nofollow'
|
||||
class='createlink' href='http://www.arduino.cc/en/DavidA/Mellis?action=edit'>?</a>:
|
||||
</li><li><a class='wikilink' href='Guide_HowtoGet.html'>HowtoGet</a> . . . February 21, 2007, at 03:48 PM by <a class='createlinktext' rel='nofollow'
|
||||
href='http://www.arduino.cc/en/DavidA/Mellis?action=edit'>David A. Mellis</a><a rel='nofollow'
|
||||
class='createlink' href='http://www.arduino.cc/en/DavidA/Mellis?action=edit'>?</a>:
|
||||
</li><li><a class='wikilink' href='Guide_References.html'>References</a> . . . November 04, 2006, at 02:11 PM by <a class='createlinktext' rel='nofollow'
|
||||
href='http://www.arduino.cc/en/DavidA/Mellis?action=edit'>David A. Mellis</a><a rel='nofollow'
|
||||
class='createlink' href='http://www.arduino.cc/en/DavidA/Mellis?action=edit'>?</a>:
|
||||
</li><li><a class='wikilink' href='Guide_HowtoReferences.html'>HowtoReferences</a> . . . November 04, 2006, at 07:50 AM by <a class='createlinktext' rel='nofollow'
|
||||
href='http://www.arduino.cc/en/DavidA/Mellis?action=edit'>David A. Mellis</a><a rel='nofollow'
|
||||
class='createlink' href='http://www.arduino.cc/en/DavidA/Mellis?action=edit'>?</a>:
|
||||
</li><li><a class='wikilink' href='Guide_HowtoDownload.html'>HowtoDownload</a> . . . November 04, 2006, at 07:47 AM by <a class='createlinktext' rel='nofollow'
|
||||
href='http://www.arduino.cc/en/DavidA/Mellis?action=edit'>David A. Mellis</a><a rel='nofollow'
|
||||
class='createlink' href='http://www.arduino.cc/en/DavidA/Mellis?action=edit'>?</a>:
|
||||
</li><li><a class='wikilink' href='Guide_Howto.html'>Howto</a> . . . November 04, 2006, at 07:14 AM by <a class='createlinktext' rel='nofollow'
|
||||
href='http://www.arduino.cc/en/DavidA/Mellis?action=edit'>David A. Mellis</a><a rel='nofollow'
|
||||
class='createlink' href='http://www.arduino.cc/en/DavidA/Mellis?action=edit'>?</a>: adding new hardware wizard screenshots
|
||||
</li><li><a class='wikilink' href='Guide_Board.html'>Board</a> . . . October 26, 2006, at 04:23 PM by <a class='createlinktext' rel='nofollow'
|
||||
href='http://www.arduino.cc/en/DavidA/Mellis?action=edit'>David A. Mellis</a><a rel='nofollow'
|
||||
class='createlink' href='http://www.arduino.cc/en/DavidA/Mellis?action=edit'>?</a>:
|
||||
</li><li><a class='wikilink' href='Guide_Guide.html'>Guide</a> . . . October 22, 2006, at 01:19 PM by <a class='createlinktext' rel='nofollow'
|
||||
href='http://www.arduino.cc/en/DavidA/Mellis?action=edit'>David A. Mellis</a><a rel='nofollow'
|
||||
class='createlink' href='http://www.arduino.cc/en/DavidA/Mellis?action=edit'>?</a>:
|
||||
</li></ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!--PageFooterFmt-->
|
@@ -0,0 +1,82 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - References </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc/">Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav">
|
||||
<p><a class='wikilink' href='Guide_index.html'>Guide</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='http://www.arduino.cc/en/Tutorial/HomePage'>Tutorials</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='index.html'>Reference</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='http://www.arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='http://www.arduino.cc/en/Main/Software'>Software</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='urllink' href='http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl' rel='nofollow'>Forum</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='urllink' href='http://www.arduino.cc/playground/' rel='nofollow'>Playground</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='urllink' href='http://www.arduino.cc/playground/Projects/ArduinoUsers' rel='nofollow'>Exhibition</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='http://www.arduino.cc/en/Hacking/HomePage'>Hacking</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='http://www.arduino.cc/en/Main/FAQ'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='http://www.arduino.cc/en/Main/Buy'>Buy</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><a class='wikilink' href='Guide_index.html'>Introduction</a> | How To: <a class='wikilink' href='Guide_Windows.html'>Windows</a>, <a class='wikilink' href='Guide_MacOSX.html'>Mac OS X</a>, <a class='urllink' href='http://www.arduino.cc/playground/Learning/Linux' rel='nofollow'>Linux</a>; <a class='wikilink' href='Guide_ArduinoMini.html'>Arduino Mini</a>, <a class='wikilink' href='Guide_ArduinoBT.html'>Arduino BT</a> | <a class='wikilink' href='Guide_Troubleshooting.html'>Troubleshooting</a> | <a class='wikilink' href='Guide_Board.html'>Board</a> | <a class='wikilink' href='Guide_Environment.html'>Environment</a>
|
||||
</p><h2>Other Resources</h2>
|
||||
<h3>On the Arduino Website</h3>
|
||||
<ul><li><a class='wikilink' href='http://www.arduino.cc/en/Tutorial/HomePage'>Tutorials</a>: code examples and circuits for performing many tasks.
|
||||
<p class='vspace'></p></li><li><a class='wikilink' href='index.html'>Reference</a>: documentation of the Arduino programming language and functions.
|
||||
<p class='vspace'></p></li><li><a class='wikilink' href='http://www.arduino.cc/en/Main/Hardware'>Hardware</a>: descriptions of the various Arduino boards and other hardware, with schematics, PCB layout files, assembly instructions, etc.
|
||||
<p class='vspace'></p></li><li><a class='wikilink' href='http://www.arduino.cc/en/Main/ComparisonProcessing'>Language comparison</a>: compares the Arduino/Wiring language (based on C/C++) with Processing (based on Java).
|
||||
<p class='vspace'></p></li><li><a class='wikilink' href='http://www.arduino.cc/en/Main/FAQ'>FAQ</a>: frequently asked questions about Arduino.
|
||||
<p class='vspace'></p></li><li><a class='urllink' href='http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl' rel='nofollow'>Discussion forums</a>: for questions about anything Arduino related.
|
||||
<p class='vspace'></p></li><li><a class='urllink' href='http://www.arduino.cc/playground/' rel='nofollow'>Playground</a>: a publicly editable wiki collecting community documentation (<a class='urllink' href='http://www.arduino.cc/playground/Main/Participate#requestaccess' rel='nofollow'>register here</a>).
|
||||
</li></ul><p class='vspace'></p><h3>External Resources on Arduino</h3>
|
||||
<ul><li><a class='urllink' href='http://www.sbk.flr4.org/arduino/index.html' rel='nofollow'>Video lectures</a>: Tom Igoe introduces Arduino. (thanks to Pollie Barden).
|
||||
<p class='vspace'></p></li><li><a class='urllink' href='http://todbot.com/blog/spookyarduino/' rel='nofollow'>Course guides</a>: Longer documents introducing Arduino: <a class='urllink' href='http://todbot.com/blog/wp-content/uploads/2006/10/arduino_spooky_projects_class1.pdf' rel='nofollow'>class 1 (getting started)</a>, <a class='urllink' href='http://todbot.com/blog/wp-content/uploads/2006/10/arduino_spooky_projects_class2.pdf' rel='nofollow'>class 2 (input and sensors)</a>, <a class='urllink' href='http://todbot.com/blog/wp-content/uploads/2006/10/arduino_spooky_projects_class3.pdf' rel='nofollow'>class 3 (communication, servos, and pwm)</a>, <a class='urllink' href='http://todbot.com/blog/wp-content/uploads/2006/10/arduino_spooky_projects_class4.pdf' rel='nofollow'>class 4 (piezo sound & sensors, arduino+processing, stand-alone operation)</a>.
|
||||
</li></ul><p class='vspace'></p><h3>Electronics and Physical Computing</h3>
|
||||
<ul><li><a class='urllink' href='http://wiring.org.co/reference/electronics/index.html' rel='nofollow'>Wiring electronics reference</a>: circuit diagrams for connecting a variety of basic electronic components.
|
||||
<p class='vspace'></p></li><li><a class='urllink' href='http://wiring.org.co/learning/tutorials/diagrams.html' rel='nofollow'>Schematics to circuits</a>: from Wiring, a guide to transforming circuit diagrams into physical circuits.
|
||||
<p class='vspace'></p></li><li><a class='urllink' href='http://www.opencircuits.com/Main_Page' rel='nofollow'>Open Circuits</a>: a public wiki collecting electronic circuits, components, and techniques.
|
||||
<p class='vspace'></p></li><li><a class='urllink' href='http://tigoe.net/pcomp/' rel='nofollow'>Tom Igoe's Physical Computing Site</a>: lots of information on electronics, microcontrollers, sensors, actuators, books, etc.
|
||||
</li></ul><p class='vspace'></p><h3>Related Sites</h3>
|
||||
<ul><li><a class='urllink' href='http://www.instantsoup.org/' rel='nofollow'>Instant Soup</a> is an introduction to electronics through a series of beautifully-documented fun projects.
|
||||
<p class='vspace'></p></li><li><a class='urllink' href='http://www.makezine.com/' rel='nofollow'>Make magazine</a> has some great links in its <a class='urllink' href='http://www.makezine.com/blog/archive/electronics/' rel='nofollow'>electronics archive</a>.
|
||||
<p class='vspace'></p></li><li><a class='urllink' href='http://www.hackaday.com/' rel='nofollow'>hack a day</a> has links to interesting hacks and how-to articles on various topics.
|
||||
</li></ul><p class='vspace'></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!--PageFooterFmt-->
|
@@ -0,0 +1,229 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - Troubleshooting </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<h2>Arduino Troubleshooting</h2>
|
||||
<div class='toc'><p><a name='toc' id='toc'></a><b>On this page...</b> (<a id="tocidtog" href="javascript:toggle('tocid');">hide</a>)</p><ul class='toc' id='tocid'><li><a href='#toc1'>Why I can't upload my programs to the Arduino board?</a></li><li><a href='#toc2'>Why do I get "Build folder disappeared or could not be written" (Mac OS X)?</a></li><li><a href='#toc3'>Why doesn't the Arduino software run after I updated the Java on my Mac?</a></li><li><a href='#toc4'>Why do I get a java.lang.StackOverflowError when I try to compile my program?</a></li><li><a href='#toc5'>Why doesn't my sketch start when I'm powering the board with an external power supply? (Arduino Diecimila or earlier)</a></li><li><a href='#toc6'>Why does the Arduino software freeze when I try to upload a program? (on Windows)?</a></li><li><a href='#toc7'>What if my board doesn't turn on (the green power LED doesn't light up)?</a></li><li><a href='#toc8'>Why does my Diecimila take such a long time (6-8 seconds) to start my sketch?</a></li><li><a href='#toc9'>What should I do if I get an error when launching arduino.exe on Windows?</a></li><li><a href='#toc10'>Why won't Arduino run on old versions of Mac OS X?</a></li><li><a href='#toc11'>What do I do if I get an UnsatisfiedLinkError error (about native library librxtxSerial.jnilib) when launching Arduino?</a></li><li><a href='#toc12'>What about the error "Could not find the main class."?</a></li><li><a href='#toc13'>What can I do about cygwin conflicts on Windows?</a></li><li><a href='#toc14'>Why does do the Arduino software and the Tools menu take a long time to open (on Windows)?</a></li><li><a href='#toc15'>Why doesn't my board show in the Tools | Serial Port menu ?</a></li><li><a href='#toc16'>What if I get a gnu.io.PortInUseException when uploading code or using the serial monitor (on the Mac)?</a></li><li><a href='#toc17'>I'm having trouble with the FTDI USB drivers.</a></li><li><a href='#toc18'>Why doesn't my sketch start when I power up or reset the Arduino board?</a></li><li><a href='#toc19'>Why does my sketch appear to upload successfully but not do anything?</a></li><li><a href='#toc20'>How can I reduce the size of my sketch?</a></li><li><a href='#toc21'>Why don't I get a PWM (an analog output) when I call analogWrite() on pins other than 3, 5, 6, 9, 10, or 11?</a></li><li><a href='#toc22'>Why do I get errors about undeclared functions or undeclared types?</a></li><li><a href='#toc23'>Why do I get errors about an invalid device signature when trying to upload a sketch?</a></li></ul></div>
|
||||
<p class='vspace'></p><p><a name='upload' id='upload'></a>
|
||||
</p><h3><a name='toc1' id='toc1'></a>Why I can't upload my programs to the Arduino board?</h3>
|
||||
<p>There are a few things that could be wrong.
|
||||
</p>
|
||||
<p class='vspace'></p><ul><li>First make sure your board is on (the green LED is on) and connected to the computer (if it's not, see "what if my board doesn't turn on" above).
|
||||
<p class='vspace'></p></li><li>Then, check that the proper port is selected in the "Tools > Serial Port" menu (if your port doesn't appear, restart the IDE with the board connected to the computer).
|
||||
<p class='vspace'></p></li><li>Make sure you have the right item selected in the <strong>Tools > Board</strong> menu. In particular, newer Arduino Duemilanove boards come with an <span class='wikiword'>ATmega328</span>, while older ones have an <span class='wikiword'>ATmega168</span>. To check, read the text on the microcontroller (the larger chip) on your Arduino board. For more information on the board menu items, see the <a class='wikilink' href='Guide_Environment.html'>guide to the Arduino environment</a>.
|
||||
<p class='vspace'></p></li><li>Disconnect digital pins 0 and 1 while uploading (they can connected and used after the code has been uploaded).
|
||||
<p class='vspace'></p></li><li>Try uploading with nothing connected to the board (apart from the USB cable, of course).
|
||||
<p class='vspace'></p></li><li>Make sure the board isn't touching anything metallic or conductive.
|
||||
<p class='vspace'></p></li><li>Check that you're not running any programs that scan all serial ports, like PDA sync applications, Bluetooth-USB drivers (e.g. <span class='wikiword'>BlueSoleil</span>), virtual daemon tools, etc.
|
||||
<p class='vspace'></p></li><li>Make sure you don't have firewall software that blocks access to the serial port (e.g. <span class='wikiword'>ZoneAlarm</span>).
|
||||
<p class='vspace'></p></li><li>You may need to quit Processing, PD, vvvv, etc. if you're using them to read data over the USB or serial connection to the Arduino board.
|
||||
<p class='vspace'></p></li><li>If you have a board that doesn't support auto-reset, be sure that you are resetting the board a couple of seconds before uploading. (The Arduino Diecimila, Duemilanove, and Nano support auto-reset as do the <span class='wikiword'>LilyPad</span>, Pro, and Pro Mini with 6-pin programming headers).
|
||||
<p class='vspace'></p></li><li>However, note that some Diecimila were accidently burned with the wrong bootloader and may require you to physically press the reset button before uploading; see <a href='#wrongbootloader'>this question</a> below.
|
||||
<p class='vspace'></p></li><li>However, on some computers, you may need to press the reset button on the board after you hit the upload button in the Arduino environment. Try different intervals of time between the two, up to 10 seconds or more.
|
||||
<p class='vspace'></p></li><li>If you get this error: <code>[VP 1] Device is not responding correctly.</code> try uploading again (i.e. reset the board and press the download button a second time).
|
||||
<p class='vspace'></p></li><li>Make sure there's a bootloader burned on your Arduino board. To check, connect an LED to pin 13 and reset the board. The LED should blink. If it doesn't, see the <a class='wikilink' href='http://arduino.cc/en/Hacking/Bootloader'>Bootloader</a> page for instructions on burning a bootloader to the board.
|
||||
<p class='vspace'></p></li><li>If you have a really ancient Arduino board, you may need to change the baud rate at which sketches are uploaded to 9600 (from the normal 19200). You will have to change the speed in the <em>preferences</em> file directly. See the <a class='wikilink' href='http://arduino.cc/en/Hacking/Preferences'>preferences</a> page for instructions on finding the file. Look for the file in your computer and change the <strong>serial.download_rate</strong> property to match the one in your board. If you have such a board, it's recommended that you burn the latest bootloader (which works at 19200 baud). This can be done with the <em>'Tools | Burn Bootloader</em> menu item.
|
||||
</li></ul><p class='vspace'></p><p>If it still doesn't work, you can ask for help <a class='urllink' href='http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?board=troubleshoot' rel='nofollow'>in the forum</a>. Please include the following information:
|
||||
</p>
|
||||
<p class='vspace'></p><ul><li>Your operating system.
|
||||
<p class='vspace'></p></li><li>What kind of board you have. If it's a Mini, <span class='wikiword'>LilyPad</span> or other board that requires extra wiring, include a photo of your circuit, if possible.
|
||||
<p class='vspace'></p></li><li>Whether or not you were ever able to upload to the board. If so, what were you doing with the board before / when it stopped working, and what software have you recently added or removed from your computer?
|
||||
<p class='vspace'></p></li><li>The messages displayed when you try to upload with verbose output enabled. To do this, hold down the shift key while clicking on the upload button in the toolbar.
|
||||
</li></ul><p class='vspace'></p><h3><a name='toc2' id='toc2'></a>Why do I get "Build folder disappeared or could not be written" (Mac OS X)?</h3>
|
||||
<p>Did you drag the Arduino.app out of the disk image (and into, say, your Applications folder)? If not, you won't be able to upload the examples.
|
||||
</p>
|
||||
<p class='vspace'></p><p><a name='macupdate' id='macupdate'></a>
|
||||
</p><h3><a name='toc3' id='toc3'></a>Why doesn't the Arduino software run after I updated the Java on my Mac?</h3>
|
||||
<p>The latest Java update from Apple attempts to use 64-bit version of native libraries, but the Arduino application comes with a 32 bit version of the RXTX library. If you launch Arduino, you'll get an error like:
|
||||
</p>
|
||||
<p class='vspace'></p><p><code>Uncaught exception in main method: java.<span class='wikiword'>lang.UnsatisfiedLinkError</span>: /Applications/arduino-0016/Arduino 16.app/Contents/Resources/Java/librxtxSerial.jnilib: no suitable image found. Did find: /Applications/arduino-0016/Arduino 16.app/Contents/Resources/Java/librxtxSerial.jnilib: no matching architecture in universal wrapper</code>
|
||||
</p>
|
||||
<p class='vspace'></p><p>To fix this, click on the Arduino application (e.g. <strong>Arduino 16.app</strong>) in the Finder, and select <strong>Get Info</strong> from the <strong>File</strong> menu. In the info panel, click the <strong>Open in 32 Bit Mode</strong> checkbox. You should then be able to launch Arduino normally.
|
||||
</p>
|
||||
<p class='vspace'></p><p><a name='stackoverflow' id='stackoverflow'></a>
|
||||
</p><h3><a name='toc4' id='toc4'></a>Why do I get a java.<span class='wikiword'>lang.StackOverflowError</span> when I try to compile my program?</h3>
|
||||
<p>The Arduino environment does some preliminary processing on your sketch by manipulating the code using regular expressions. This sometimes gets confused by certain strings of text. If you see an error like:
|
||||
</p>
|
||||
<p class='vspace'></p><pre>
|
||||
java.lang.StackOverflowError
|
||||
at java.util.Vector.addElement(Unknown Source)
|
||||
at java.util.Stack.push(Unknown Source)
|
||||
at com.oroinc.text.regex.Perl5Matcher._pushState(Perl5Matcher.java)
|
||||
</pre>
|
||||
<p class='vspace'></p><p>or:
|
||||
</p>
|
||||
<p class='vspace'></p><pre>
|
||||
at com.oroinc.text.regex.Perl5Matcher._match(Perl5Matcher.java)
|
||||
at com.oroinc.text.regex.Perl5Matcher._match(Perl5Matcher.java)
|
||||
at com.oroinc.text.regex.Perl5Matcher._match(Perl5Matcher.java)
|
||||
at com.oroinc.text.regex.Perl5Matcher._match(Perl5Matcher.java)
|
||||
at com.oroinc.text.regex.Perl5Matcher._match(Perl5Matcher.java)
|
||||
at com.oroinc.text.regex.Perl5Matcher._match(Perl5Matcher.java)
|
||||
at com.oroinc.text.regex.Perl5Matcher._match(Perl5Matcher.java)
|
||||
</pre>
|
||||
<p class='vspace'></p><p>this is what's happening. Look for unusual sequences involving "double-quotes", "single-quotes", \backslashes, comments, etc. For example, missing quotes can cause problems and so can the sequence '\"' (use '"' instead).
|
||||
</p>
|
||||
<p class='vspace'></p><p><a name='externalpower' id='externalpower'></a>
|
||||
</p><h3><a name='toc5' id='toc5'></a>Why doesn't my sketch start when I'm powering the board with an external power supply? (Arduino Diecimila or earlier)</h3>
|
||||
<p>Because the RX pin is unconnected, the bootloader on the board may be seeing garbage data coming in, meaning that it never times out and starts your sketch. Try tying the RX pin to ground with a 10K resistor (or connecting it to the TX pin).
|
||||
</p>
|
||||
<p class='vspace'></p><h3><a name='toc6' id='toc6'></a>Why does the Arduino software freeze when I try to upload a program? (on Windows)?</h3>
|
||||
<p>This might be caused by a conflict with the Logitech process '<span class='wikiword'>LVPrcSrv</span>.exe'. Open the Task Manager and see if this program is running, and if so, kill it before attempting the upload. <a class='urllink' href='http://lists-archives.org/mingw-users/03939-as-exe-hanging-intermittently-solved.html' rel='nofollow'>more information</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a name='power' id='power'></a>
|
||||
</p><h3><a name='toc7' id='toc7'></a>What if my board doesn't turn on (the green power LED doesn't light up)?</h3>
|
||||
<p>If you're using a USB board, make sure that the jumper (little plastic piece near the USB plug) is on the correct pins. If you're powering the board with an external power supply (plugged into the power plug), the jumper should be on the two pins closest to the power plug. If you're powering the board through the USB, the jumper should be on the two pins closest to the USB plug. This picture shows the arrangment for powering the board from the USB port.
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='createlinktext' href='Guide_Troubleshooting?action=upload&upname=jumper.jpg.html'>Attach:jumper.jpg</a><a class='createlink' href='Guide_Troubleshooting?action=upload&upname=jumper.jpg.html'> Δ</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p>(thanks to mrbbp for report and picture)
|
||||
</p>
|
||||
<p class='vspace'></p><p><a name='wrongbootloader' id='wrongbootloader'></a>
|
||||
</p><h3><a name='toc8' id='toc8'></a>Why does my Diecimila take such a long time (6-8 seconds) to start my sketch?</h3>
|
||||
<p>Some of the Arduino Diecimila boards were accidently burned with the Arduino NG bootloader. It should work fine, but has a longer delay when the board is reset (because the NG doesn't have an automatic reset, so you have to time the uploads manually). You can recognize the NG bootloader because the LED on pin 13 will blink three times when you reset the board (as compared to once with the Diecimila bootloader). If your Diecimila has the NG bootloader on it, you may need to physically press the reset button on the board before uploading your sketch. You can burn the correct bootloader onto your Diecimila, see the <a class='wikilink' href='http://arduino.cc/en/Hacking/Bootloader'>bootloader</a> page for details.
|
||||
</p>
|
||||
<p class='vspace'></p><p><a name='startup' id='startup'></a>
|
||||
</p><h3><a name='toc9' id='toc9'></a>What should I do if I get an error when launching arduino.exe on Windows?</h3>
|
||||
<p>If you get an error when double-clicking the arduino.exe executable on Windows, for example:
|
||||
</p>
|
||||
<p class='vspace'></p><p><code>Arduino has encountered a problem and needs to close.</code>
|
||||
</p>
|
||||
<p class='vspace'></p><p>you'll need to launch Arduino using the run.bat file. Please be patient, the Arduino environment may take some time to open.
|
||||
</p>
|
||||
<p class='vspace'></p><h3><a name='toc10' id='toc10'></a>Why won't Arduino run on old versions of Mac OS X?</h3>
|
||||
<p>If you get an error like this:
|
||||
</p>
|
||||
<p class='vspace'></p><pre>Link (dyld) error:
|
||||
|
||||
dyld: /Applications/arduino-0004/Arduino 04.app/Contents/MacOS/Arduino Undefined symbols:
|
||||
/Applications/arduino-0004/librxtxSerial.jnilib undefined reference to _printf$LDBL128 expected to be defined in /usr/lib/libSystem.B.dylib
|
||||
</pre>
|
||||
<p class='vspace'></p><p>you probably need to upgrade to Max OS X 10.3.9 or later. Older versions have incompatible versions of some system libraries.
|
||||
</p>
|
||||
<p class='vspace'></p><p>Thanks to Gabe462 for the report.
|
||||
</p>
|
||||
<p class='vspace'></p><h3><a name='toc11' id='toc11'></a>What do I do if I get an <span class='wikiword'>UnsatisfiedLinkError</span> error (about native library librxtxSerial.jnilib) when launching Arduino?</h3>
|
||||
<p>If you get an error like this when launching Arduino:
|
||||
</p>
|
||||
<p class='vspace'></p><p><code>Uncaught exception in main method: java.<span class='wikiword'>lang.UnsatisfiedLinkError</span>: Native Library /Users/anu/Desktop/arduino-0002/librxtxSerial.jnilib already loaded in another classloader</code>
|
||||
</p>
|
||||
<p class='vspace'></p><p>you probably have an old version of the communications library lying around. Search for comm.jar or jcl.jar in /System/Library/<span class='wikiword'>Frameworks/JavaVM</span>.framework/ or in directories in your CLASSPATH or PATH environment variables. (reported by Anurag Sehgal)
|
||||
</p>
|
||||
<p class='vspace'></p><h3><a name='toc12' id='toc12'></a>What about the error "Could not find the main class."?</h3>
|
||||
<p>If you get this error when launching Arduino:
|
||||
</p>
|
||||
<p class='vspace'></p><p><code>Java Virtual Machine Launcher: Could not find the main class. Program will exit.</code>
|
||||
</p>
|
||||
<p class='vspace'></p><p>make sure that you correctly extracted the contents of the Arduino .zip file - in particular that the <strong>lib</strong> directory is directly inside of the Arduino directory and contains the file <strong>pde.jar</strong>.
|
||||
</p>
|
||||
<p class='vspace'></p><h3><a name='toc13' id='toc13'></a>What can I do about cygwin conflicts on Windows?</h3>
|
||||
<p>If you already have cygwin installed on your machine, you might get an error like this when you try to compile a sketch in Arduino:
|
||||
</p>
|
||||
<p class='vspace'></p><p><code> 6 [main] ? (3512) C:\Dev\arduino-0006\tools\avr\bin\avr-gcc.exe: *** fatal error - C:\Dev\arduino-0006\tools\avr\bin\avr-gcc.exe: *** system shared memory version mismatch detected - 0x75BE0084/0x75BE009C.</code>
|
||||
</p>
|
||||
<p class='vspace'></p><p><code>This problem is probably due to using incompatible versions of the cygwin DLL.</code>
|
||||
</p>
|
||||
<p class='vspace'></p><p><code>Search for cygwin1.dll using the Windows Start->Find/Search facility and delete all but the most recent version. The most recent version *should* reside in x:\cygwin\bin, where 'x' is the drive on which you have installed the cygwin distribution. Rebooting is also suggested if you are unable to find another cygwin DLL.</code>
|
||||
</p>
|
||||
<p class='vspace'></p><p>If so, first make sure that you don't have cygwin running when you use Arduino. If that doesn't help, you can try deleting cygwin1.dll from the Arduino directory and replacing it with the cygwin1.dll from your existing cygwin install (probably in c:\cygwin\bin).
|
||||
</p>
|
||||
<p class='vspace'></p><p><em>Thanks to karlcswanson for the suggestion.</em>
|
||||
</p>
|
||||
<p class='vspace'></p><h3><a name='toc14' id='toc14'></a>Why does do the Arduino software and the Tools menu take a long time to open (on Windows)?</h3>
|
||||
<p>If the Arduino software takes a long time to start up and appears to freeze when you try to open the Tools menu, there by a conflict with another device on your system. The Arduino software, on startup and when you open the Tools menu, tries to get a list of all the COM ports on your computer. It's possible that a COM port created by one of the devices on your computer slows down this process. Take a look in the Device Manager. Try disabling the devices that provide COM ports (e.g. Bluetooth devices).
|
||||
</p>
|
||||
<p class='vspace'></p><p><a name='serialport' id='serialport'></a>
|
||||
</p><h3><a name='toc15' id='toc15'></a>Why doesn't my board show in the Tools | Serial Port menu ?</h3>
|
||||
<p>If you're using a USB Arduino board, make sure you installed the FTDI drivers (see the <a class='wikilink' href='Guide_Howto.html'>Howto</a> for directions). If you're using a USB-to-Serial adapter with a serial board, make sure you installed its drivers.
|
||||
</p>
|
||||
<p class='vspace'></p><p>Make sure that the board is plugged in: the serial port menu refreshes whenever you open the <strong>Tools</strong> menu, so if you just unplugged the board, it won't be in the menu.
|
||||
</p>
|
||||
<p class='vspace'></p><p>Check that you're not running any programs that scan all serial ports, like PDA sync applications, Bluetooth-USB drivers (e.g. <span class='wikiword'>BlueSoleil</span>), virtual daemon tools, etc.
|
||||
</p>
|
||||
<p class='vspace'></p><p>On Windows, the COM port assigned to the board may be too high. From zeveland:
|
||||
</p>
|
||||
<p class='vspace'></p><p>"One little note if you aren't able to export and your USB board is trying to use a high COM port number: try changing the FTDI chip's COM port assignment to a lower one.
|
||||
</p>
|
||||
<p class='vspace'></p><p>"I had a bunch of virtual COM ports set up for Bluetooth so the board was set to use <span class='wikiword'>COM17</span>. The IDE wasn't able to find the board so I deleted the other virtual ports in Control Panel (on XP) and moved the FTDI's assignment down to <span class='wikiword'>COM2</span>. Make sure to set Arduino to use the new port and good luck."
|
||||
</p>
|
||||
<p class='vspace'></p><p>On the Mac, if you have an old version of the FTDI drivers, you may need to remove them and reinstall the latest version. See <a class='urllink' href='http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1143197735' rel='nofollow'>this forum thread for directions</a> (thanks to gck).
|
||||
</p>
|
||||
<p class='vspace'></p><h3><a name='toc16' id='toc16'></a>What if I get a gnu.<span class='wikiword'>io.PortInUseException</span> when uploading code or using the serial monitor (on the Mac)?</h3>
|
||||
<pre>
|
||||
Error inside Serial.<init>()
|
||||
gnu.io.PortInUseException: Unknown Application
|
||||
at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354)
|
||||
at processing.app.Serial.<init>(Serial.java:127)
|
||||
at processing.app.Serial.<init>(Serial.java:72)
|
||||
|
||||
</pre>
|
||||
<p class='vspace'></p><p>This probably means that the port is actually in use by another application. Please make sure that you're not running other programs that access serial or USB ports, like PDA sync application, bluetooth device managers, certain firewalls, etc. Also, note that some programs (e.g. Max/MSP) keep the serial port open even when not using it - you may to need to close any patches that use the serial port or quit the application entirely.
|
||||
</p>
|
||||
<p class='vspace'></p><p>If you get this error with Arduino 0004 or earlier, or with Processing, you'll need to run the <code>macosx_setup.command</code>, and then restart your computer. Arduino 0004 includes a modified version of this script that all users need to run (even those who ran the one that came with Arduino 0003). You may also need to delete the contents of the <strong>/var/spool/uucp</strong> directory.
|
||||
</p>
|
||||
<p class='vspace'></p><h3><a name='toc17' id='toc17'></a>I'm having trouble with the FTDI USB drivers.</h3>
|
||||
<p>Try installing the <a class='urllink' href='http://www.ftdichip.com/Drivers/VCP.htm' rel='nofollow'>latest drivers</a> from FTDI or contacting their support at <a class='urllink' href='mailto:support1@ftdichip.com' rel='nofollow'>support1@ftdichip.com</a>.
|
||||
</p>
|
||||
<p class='vspace'></p><p><a name='sketchstart' id='sketchstart'></a>
|
||||
</p><h3><a name='toc18' id='toc18'></a>Why doesn't my sketch start when I power up or reset the Arduino board?</h3>
|
||||
<p>Most likely because you are sending serial data to the board when it firsts turns on. During the first few seconds, the bootloader (a program pre-burned onto the chip on the board) listens for the computer to send it a new sketch to be uploaded to the board. After a few seconds without communication, the bootloader will time out and start the sketch that's already on the board. If you continue to send data to the bootloader, it will never time out and your sketch will never start. You'll either need to find a way to stop serial data from arriving for the first few seconds when the board powers (e.g. by enabling the chip that sends the data from within your setup() function) or burn your sketch onto the board with an <a class='wikilink' href='http://arduino.cc/en/Hacking/Programmer'>external programmer</a>, replacing the bootloader.
|
||||
</p>
|
||||
<p class='vspace'></p><h3><a name='toc19' id='toc19'></a>Why does my sketch appear to upload successfully but not do anything?</h3>
|
||||
<p>You have selected the wrong item from the Tools > Microcontroller menu. Make sure the selected microcontroller corresponds to the one on your board (either <span class='wikiword'>ATmega8</span> or <span class='wikiword'>ATmega168</span>) - the name will be written on the largest chip on the board.
|
||||
</p>
|
||||
<p class='vspace'></p><p>Check for a noisy power supply. It's possible this could cause the chip to lose its sketch.
|
||||
</p>
|
||||
<p class='vspace'></p><p>Alternatively, the sketch may be too big for the board. When uploading your sketch, Arduino 0004 checks if it's too big for the <span class='wikiword'>ATmega8</span>, but it bases its calculation on a 1 Kb bootloader. You may have a older bootloader that takes up 2 Kb of the 8 Kb of program space (flash) on the <span class='wikiword'>ATmega8</span> instead of the 1 Kb used by the current bootloader. If yours is bigger, only part of the sketch will be uploaded, but the software won't know, and your board will continually reset, pause, reset.
|
||||
</p>
|
||||
<p class='vspace'></p><p>If you have access to an AVR-ISP or parallel port programmer, you can burn the latest version of the bootloader to your board with the <strong>Tools | Burn Bootloader</strong> menu item. Otherwise, you can tell the Arduino environment the amount of space available for sketches by editing the upload.maximum_size variable in your preferences file (see: <a class='wikilink' href='http://arduino.cc/en/Hacking/Preferences'>instructions on finding the file</a>). Change 7168 to 6144, and the environment should correctly warn you when your sketch is too big.
|
||||
</p>
|
@@ -0,0 +1,83 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - Windows </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<h2>Getting Started w/ Arduino on Windows</h2>
|
||||
<p><em>This document explains how to connect your Arduino board to the computer and upload your first sketch.</em>
|
||||
</p>
|
||||
<p class='vspace'></p><div class='toc'><p><a name='toc' id='toc'></a><b>On this page...</b> (<a id="tocidtog" href="javascript:toggle('tocid');">hide</a>)</p><ul class='toc' id='tocid'><li><a href='#toc1'>1 | Get an Arduino board and USB cable</a></li><li><a href='#toc2'>2 | Download the Arduino environment</a></li><li><a href='#toc3'>3 | Connect the board</a></li><li><a href='#toc4'>4 | Install the drivers</a></li><li><a href='#toc5'>5 | Launch the Arduino application</a></li><li><a href='#toc6'>6 | Open the blink example</a></li><li><a href='#toc7'>7 | Select your board</a></li><li><a href='#toc8'>8 | Select your serial port</a></li><li><a href='#toc9'>8 | Upload the program</a></li></ul></div>
|
||||
<p class='vspace'></p><h3><a name='toc1' id='toc1'></a>1 | Get an Arduino board and USB cable</h3>
|
||||
<p>In this tutorial, we assume you're using an <a class='wikilink' href='http://arduino.cc/en/Main/ArduinoBoardDuemilanove'>Arduino Duemilanove</a>, <a class='wikilink' href='http://arduino.cc/en/Main/ArduinoBoardNano'>Nano</a>, or <a class='wikilink' href='http://arduino.cc/en/Main/ArduinoBoardDiecimila'>Diecimila</a>. If you have another board, read the corresponding page in this getting started guide.
|
||||
</p>
|
||||
<p class='vspace'></p><p>You also need a standard USB cable (A plug to B plug): the kind you would connect to a USB printer, for example. (For the Arduino Nano, you'll need an A to Mini-B cable instead.)
|
||||
</p>
|
||||
<p class='vspace'></p><div><img src='http://arduino.cc/en/uploads/Guide/ArduinoDuemilanove.png' alt='' title='' /> <img src='http://arduino.cc/en/uploads/Guide/USBCable.jpg' alt='' title='' /></div>
|
||||
<p class='vspace'></p><p><em>Photos by <span class='wikiword'>SparkFun</span> Electronics.</em>
|
||||
</p>
|
||||
<p class='vspace'></p><h3><a name='toc2' id='toc2'></a>2 | Download the Arduino environment</h3>
|
||||
<p>Get the latest version from the <a class='wikilink' href='http://arduino.cc/en/Main/Software'>download page</a>.
|
||||
</p>
|
||||
<p class='vspace'></p><p>When the download finishes, unzip the downloaded file. Make sure to preserve the folder structure. Double-click the folder to open it. There should be a few files and sub-folders inside.
|
||||
</p>
|
||||
<p class='vspace'></p><h3><a name='toc3' id='toc3'></a>3 | Connect the board</h3>
|
||||
<p>Connect the Arduino board to your computer using the USB cable. The green power LED (labelled <strong>PWR</strong>) should go on.
|
||||
</p>
|
||||
<p class='vspace'></p><p>If you're using an Arduino Diecimila, you'll need to make sure that the board is configured to draw power from the USB connection. The power source is selected with a jumper, a small piece of plastic that fits onto two of the three pins between the USB and power jacks. Check that it's on the two pins closest to the USB port.
|
||||
</p>
|
||||
<p class='vspace'></p><p>The Arduino Duemilanove and Arduino Nano automatically select the appropriate power source.
|
||||
</p>
|
||||
<p class='vspace'></p><h3><a name='toc4' id='toc4'></a>4 | Install the drivers</h3>
|
||||
<p>When you connect the board, Windows should initiate the driver installation process (if you haven't used the computer with an Arduino board before).
|
||||
</p>
|
||||
<p class='vspace'></p><p>On Windows Vista, the driver should be automatically downloaded and installed. (Really, it works!)
|
||||
</p>
|
@@ -0,0 +1,48 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - Getting Started </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='selflink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
@@ -0,0 +1,44 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - HighByte </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
@@ -0,0 +1,192 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - Reference </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc/">Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav">
|
||||
<p><a class='wikilink' href='Guide_index.html'>Guide</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='http://www.arduino.cc/en/Tutorial/HomePage'>Tutorials</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='selflink' href='index.html'>Reference</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='http://www.arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='http://www.arduino.cc/en/Main/Software'>Software</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='urllink' href='http://www.arduino.cc/blog/' rel='nofollow'>Blog</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='urllink' href='http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl' rel='nofollow'>Forum</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='urllink' href='http://www.arduino.cc/playground/' rel='nofollow'>Playground</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='urllink' href='http://www.arduino.cc/playground/Projects/ArduinoUsers' rel='nofollow'>Exhibition</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='http://www.arduino.cc/en/Hacking/HomePage'>Hacking</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='http://www.arduino.cc/en/Main/FAQ'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='http://www.arduino.cc/en/Main/Buy'>Buy</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><strong>Reference</strong> <a class='selflink' href='index.html'>Language</a> (<a class='wikilink' href='Extended.html'>extended</a>) | <a class='wikilink' href='Libraries.html'>Libraries</a> | <a class='wikilink' href='Comparison.html'>Comparison</a>
|
||||
</p>
|
||||
<p class='vspace'></p><h1>Arduino Reference</h1>
|
||||
<p><em>See the <strong><a class='wikilink' href='Extended.html'>extended reference</a></strong> for more advanced features of the Arduino languages.</em>
|
||||
</p>
|
||||
<p class='vspace'></p><p>Arduino programs can be divided in three main parts: <em>structure</em>, <em>values</em> (variables and constants), and <em>functions</em>. The Arduino language is based on C/C++.
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
<table width='90%' border='0' cellpadding='5' cellspacing='0'><tr><td width='50%' valign='top'>
|
||||
<h2>Structure</h2>
|
||||
<p>An Arduino program run in two parts:
|
||||
</p>
|
||||
<p class='vspace'></p><ul><li>void <a class='wikilink' href='Setup.html'>setup</a>()
|
||||
</li><li>void <a class='wikilink' href='Loop.html'>loop</a>()
|
||||
</li></ul><p class='vspace'></p><p>setup() is preparation, and loop() is execution. In the setup section, always at the top of your program, you would set <a class='wikilink' href='PinMode.html'>pinModes</a>, initialize serial communication, etc. The loop section is the code to be executed -- reading inputs, triggering outputs, etc.
|
||||
</p>
|
||||
<p class='vspace'></p><ul><li><a class='wikilink' href='VariableDeclaration.html'>Variable Declaration</a>
|
||||
</li><li><a class='wikilink' href='FunctionDeclaration.html'>Function Declaration</a>
|
||||
<ul><li><a class='wikilink' href='Void.html'>void</a>
|
||||
</li></ul></li></ul><p class='vspace'></p><h4>Control Structures</h4>
|
||||
<ul><li><a class='wikilink' href='If.html'>if</a>
|
||||
</li><li><a class='wikilink' href='Else.html'>if...else</a>
|
||||
</li><li><a class='wikilink' href='For.html'>for</a>
|
||||
</li><li><a class='wikilink' href='SwitchCase.html'>switch case</a>
|
||||
</li><li><a class='wikilink' href='While.html'>while</a>
|
||||
</li><li><a class='wikilink' href='DoWhile.html'>do... while</a>
|
||||
</li><li><a class='wikilink' href='Break.html'>break</a>
|
||||
</li><li><a class='wikilink' href='Continue.html'>continue</a>
|
||||
</li><li><a class='wikilink' href='Return.html'>return</a>
|
||||
</li></ul><p class='vspace'></p><h4>Further Syntax</h4>
|
||||
<ul><li><a class='wikilink' href='SemiColon.html'>;</a> (semicolon)
|
||||
</li><li><a class='wikilink' href='Braces.html'>{}</a> (curly braces)
|
||||
</li><li><a class='wikilink' href='Comments.html'>//</a> (single line comment)
|
||||
</li><li><a class='wikilink' href='Comments.html'>/* */</a> (multi-line comment)
|
||||
</li></ul><p class='vspace'></p><h4>Arithmetic Operators</h4>
|
||||
<ul><li><a class='wikilink' href='Arithmetic.html'>plus</a> (addition)
|
||||
</li><li><a class='wikilink' href='Arithmetic.html'>-</a> (subtraction)
|
||||
</li><li><a class='wikilink' href='Arithmetic.html'>*</a> (multiplication)
|
||||
</li><li><a class='wikilink' href='Arithmetic.html'>/</a> (division)
|
||||
</li><li><a class='wikilink' href='Modulo.html'>%</a> (modulo)
|
||||
</li></ul><p class='vspace'></p><h4>Comparison Operators</h4>
|
||||
<ul><li><a class='wikilink' href='If.html'>==</a> (equal to)
|
||||
</li><li><a class='wikilink' href='If.html'>!=</a> (not equal to)
|
||||
</li><li><a class='wikilink' href='If.html'><</a> (less than)
|
||||
</li><li><a class='wikilink' href='If.html'>></a> (greater than)
|
||||
</li><li><a class='wikilink' href='If.html'><=</a> (less than or equal to)
|
||||
</li><li><a class='wikilink' href='If.html'>>=</a> (greater than or equal to)
|
||||
</li></ul><p class='vspace'></p><h4>Boolean Operators</h4>
|
||||
<ul><li><a class='wikilink' href='Boolean.html'>&&</a> (and)
|
||||
</li><li><a class='wikilink' href='Boolean.html'>||</a> (or)
|
||||
</li><li><a class='wikilink' href='Boolean.html'>!</a> (not)
|
||||
</li></ul><p class='vspace'></p><h4>Compound Operators</h4>
|
||||
<ul><li><a class='wikilink' href='Increment.html'>++</a> (increment)
|
||||
</li><li><a class='wikilink' href='Increment.html'>--</a> (decrement)
|
||||
</li><li><a class='wikilink' href='IncrementCompound.html'>+=</a> (compound addition)
|
||||
</li><li><a class='wikilink' href='IncrementCompound.html'>-=</a> (compound subtraction)
|
||||
</li><li><a class='wikilink' href='IncrementCompound.html'>*=</a> (compound multiplication)
|
||||
</li><li><a class='wikilink' href='IncrementCompound.html'>/=</a> (compound division)
|
||||
</li></ul><p class='vspace'></p><h2>Variables</h2>
|
||||
<p>Variables are expressions that you can use in programs to store values, such as a sensor reading from an analog pin.
|
||||
</p>
|
||||
<p class='vspace'></p><h4>Constants</h4>
|
||||
<p>Constants are particular values with specific meanings.
|
||||
</p>
|
||||
<p class='vspace'></p><ul><li><a class='wikilink' href='Constants.html'>HIGH</a> | <a class='wikilink' href='Constants.html'>LOW</a>
|
||||
</li><li><a class='wikilink' href='Constants.html'>INPUT</a> | <a class='wikilink' href='Constants.html'>OUTPUT</a>
|
||||
<p class='vspace'></p></li><li><a class='wikilink' href='IntegerConstants.html'>Integer Constants</a>
|
||||
</li></ul><p class='vspace'></p><h4>Data Types</h4>
|
||||
<p>Variables can have various types, which are described below.
|
||||
</p>
|
||||
<p class='vspace'></p><ul><li><a class='wikilink' href='BooleanVariables.html'>boolean</a>
|
||||
</li><li><a class='wikilink' href='Char.html'>char</a>
|
||||
</li><li><a class='wikilink' href='Byte.html'>byte</a>
|
||||
</li><li><a class='wikilink' href='Int.html'>int</a>
|
||||
</li><li><a class='wikilink' href='UnsignedInt.html'>unsigned int</a>
|
||||
</li><li><a class='wikilink' href='Long.html'>long</a>
|
||||
</li><li><a class='wikilink' href='UnsignedLong.html'>unsigned long</a>
|
||||
</li><li><a class='wikilink' href='Float.html'>float</a>
|
||||
</li><li><a class='wikilink' href='Double.html'>double</a>
|
||||
</li><li><a class='wikilink' href='String.html'>string</a>
|
||||
</li><li><a class='wikilink' href='Array.html'>array</a>
|
||||
</li></ul><p class='vspace'></p><h2>Reference</h2>
|
||||
<ul><li><a class='wikilink' href='ASCIIchart.html'>ASCII chart</a>
|
||||
</li></ul><p class='vspace'></p></td><td width='50%' valign='top'>
|
||||
<h2>Functions</h2>
|
||||
<p><strong>Digital I/O</strong>
|
||||
</p><ul><li><a class='wikilink' href='PinMode.html'>pinMode</a>(pin, mode)
|
||||
</li><li><a class='wikilink' href='DigitalWrite.html'>digitalWrite</a>(pin, value)
|
||||
</li><li>int <a class='wikilink' href='DigitalRead.html'>digitalRead</a>(pin)
|
||||
</li></ul><p class='vspace'></p><p><strong>Analog I/O</strong>
|
||||
</p><ul><li>int <a class='wikilink' href='AnalogRead.html'>analogRead</a>(pin)
|
||||
</li><li><a class='wikilink' href='AnalogWrite.html'>analogWrite</a>(pin, value) - <em>PWM</em>
|
||||
</li></ul><p class='vspace'></p><p><strong>Advanced I/O</strong>
|
||||
</p><ul><li><a class='wikilink' href='ShiftOut.html'>shiftOut</a>(dataPin, clockPin, bitOrder, value)
|
||||
</li><li>unsigned long <a class='wikilink' href='PulseIn.html'>pulseIn</a>(pin, value)
|
||||
</li></ul><p class='vspace'></p><p><strong>Time</strong>
|
||||
</p><ul><li>unsigned long <a class='wikilink' href='Millis.html'>millis</a>()
|
||||
</li><li><a class='wikilink' href='Delay.html'>delay</a>(ms)
|
||||
</li><li><a class='wikilink' href='DelayMicroseconds.html'>delayMicroseconds</a>(us)
|
||||
</li></ul><p class='vspace'></p><p><strong>Math</strong>
|
||||
</p><ul><li><a class='wikilink' href='Min.html'>min</a>(x, y)
|
||||
</li><li><a class='wikilink' href='Max.html'>max</a>(x, y)
|
||||
</li><li><a class='wikilink' href='Abs.html'>abs</a>(x)
|
||||
</li><li><a class='wikilink' href='Constrain.html'>constrain</a>(x, a, b)
|
||||
</li></ul><p class='vspace'></p><p><strong>Random Numbers</strong>
|
||||
</p>
|
||||
<p class='vspace'></p><ul><li><a class='wikilink' href='RandomSeed.html'>randomSeed</a>(seed)
|
||||
</li><li>long <a class='wikilink' href='Random.html'>random</a>(max)
|
||||
</li><li>long <a class='wikilink' href='Random.html'>random</a>(min, max)
|
||||
</li></ul><p class='vspace'></p><p><strong>Serial Communication</strong>
|
||||
</p>
|
||||
<p class='vspace'></p><p>Used for communication between the Arduino board and a computer or other devices. This communication happens via the Arduino board's serial or USB connection and on digital pins 0 (RX) and 1 (TX). Thus, if you use these functions, <em>you cannot also use pins 0 and 1 for digital i/o.</em>
|
||||
</p>
|
||||
<p class='vspace'></p><ul><li><a class='wikilink' href='Serial_Begin.html'>Serial.begin</a>(speed)
|
||||
</li><li>int <a class='wikilink' href='Serial_Available.html'>Serial.available</a>()
|
||||
</li><li>int <a class='wikilink' href='Serial_Read.html'>Serial.read</a>()
|
||||
</li><li><a class='wikilink' href='Serial_Flush.html'>Serial.flush</a>()
|
||||
</li><li><a class='wikilink' href='Serial_Print.html'>Serial.print</a>(data)
|
||||
</li><li><a class='wikilink' href='Serial_Println.html'>Serial.println</a>(data)
|
||||
</li></ul><p class='vspace'></p><p><br clear='all' />
|
||||
</p>
|
||||
<p class='vspace'></p><p><strong>Didn't find something?</strong> Check the <a class='wikilink' href='Extended.html'>extended reference</a>.
|
||||
</p>
|
||||
<p class='vspace'></p></td></tr></table>
|
||||
<p><a class='selflink' href='index.html'>Reference Home</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><em>Corrections, suggestions, and new documentation should be posted to the <a class='urllink' href='http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?board=swbugs' rel='nofollow'>Forum</a>.</em>
|
||||
</p>
|
||||
<p class='vspace'></p><p>The text of the Arduino reference is licensed under a
|
||||
<a class='urllink' href='http://creativecommons.org/licenses/by-sa/3.0/' rel='nofollow'>Creative Commons Attribution-ShareAlike 3.0 License</a>. Code samples in the reference are released into the public domain.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!--PageFooterFmt-->
|
@@ -0,0 +1,71 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - If </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><strong>Reference</strong> <a class='wikilink' href='index.html'>Language</a> | <a class='wikilink' href='Libraries.html'>Libraries</a> | <a class='wikilink' href='Comparison.html'>Comparison</a> | <a class='wikilink' href='Changes.html'>Changes</a>
|
||||
</p>
|
||||
<p class='vspace'></p><h2>if (conditional) and ==, !=, <, > (comparison operators)</h2>
|
||||
<p><strong><code>if</code></strong>, which is used in conjunction with a comparison operator, tests whether a certain condition has been reached, such as an input being above a certain number. The format for an if test is:
|
||||
</p>
|
||||
<p class='vspace'></p><pre>if (someVariable > 50)
|
||||
{
|
||||
// do something here
|
||||
}
|
||||
</pre>
|
||||
<p class='vspace'></p><p>The program tests to see if someVariable is greater than 50. If it is, the program takes a particular action. Put another way, if the statement in parentheses is true, the statements inside the brackets are run. If not, the program skips over the code.
|
||||
</p>
|
||||
<p class='vspace'></p><p>The brackets may be omitted after an <em>if</em> statement. If this is done, the next line (defined by the semicolon) becomes the only conditional statement.
|
||||
</p><pre>
|
||||
|
||||
if (x > 120) digitalWrite(LEDpin, HIGH);
|
||||
|
@@ -0,0 +1,45 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - Include </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
@@ -0,0 +1,54 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - Increment </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
@@ -0,0 +1,53 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - IncrementCompound </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
@@ -0,0 +1,62 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - Int </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><strong>Reference</strong> <a class='wikilink' href='index.html'>Language</a> | <a class='wikilink' href='Libraries.html'>Libraries</a> | <a class='wikilink' href='Comparison.html'>Comparison</a> | <a class='wikilink' href='Changes.html'>Changes</a>
|
||||
</p>
|
||||
<p class='vspace'></p><h2>int</h2>
|
||||
<h4>Description</h4>
|
||||
<p>Integers are your primary datatype for number storage, and store a 2 byte value. This yields a range of -32,768 to 32,767 (minimum value of -2^15 and a maximum value of (2^15) - 1).
|
||||
</p>
|
||||
<p class='vspace'></p><p>Int's store negative numbers with a technique called <a class='urllink' href='http://en.wikipedia.org/wiki/2%27s_complement' rel='nofollow'>2's complement math.</a> The highest bit, sometimes refered to as the "sign" bit, flags the number as a negative number. The rest of the bits are inverted and 1 is added.
|
||||
</p>
|
@@ -0,0 +1,43 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - IntCast </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
@@ -0,0 +1,94 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - IntegerConstants </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><strong>Reference</strong> <a class='wikilink' href='index.html'>Language</a> | <a class='wikilink' href='Libraries.html'>Libraries</a> | <a class='wikilink' href='Comparison.html'>Comparison</a> | <a class='wikilink' href='Changes.html'>Changes</a>
|
||||
</p>
|
||||
<p class='vspace'></p><h2>Integer Constants</h2>
|
||||
<p>Integer constants are numbers used directly in a sketch, like <code>123</code>. By default, these numbers are treated as <a class='wikilink' href='Int.html'>int</a>'s but you can change this with the U and L modifiers (see below).
|
||||
</p>
|
||||
<p class='vspace'></p><p>Normally, integer constants are treated as base 10 (decimal) integers, but special notation (formatters) may be used to enter numbers in other bases.
|
||||
</p>
|
||||
<p class='vspace'></p><pre>
|
||||
Base Example Formatter Comment
|
||||
|
||||
10 (decimal) 123 none
|
||||
|
||||
2 (binary) B1111011 leading 'B' only works with 8 bit values (0 to 255)
|
||||
characters 0-1 valid
|
||||
|
||||
8 (octal) 0173 leading "0" characters 0-7 valid
|
||||
|
||||
16 (hexadecimal) 0x7B leading "0x" characters 0-9, A-F, a-f valid
|
||||
|
||||
</pre>
|
||||
<p class='vspace'></p><p><strong>Decimal</strong> is base 10. This is the common-sense math with which you are acquainted. Constants without other prefixes are assumed to be in decimal format.
|
||||
</p>
|
||||
<p class='vspace'></p>Example:<pre>
|
||||
101 // same as 101 decimal ((1 * 10^2) + (0 * 10^1) + 1)
|
||||
</pre>
|
||||
<p><br />
|
||||
<strong>Binary</strong> is base two. Only characters 0 and 1 are valid.
|
||||
</p>
|
||||
<p class='vspace'></p>Example:<pre>
|
||||
B101 // same as 5 decimal ((1 * 2^2) + (0 * 2^1) + 1)
|
||||
</pre>
|
||||
<p>The binary formatter only works on bytes (8 bits) between 0 (B0) and 255 (B11111111). If it is convenient to input an int (16 bits) in binary form you can do it a two-step procedure such as:
|
||||
</p>
|
||||
<p class='vspace'></p><pre>
|
||||
myInt = (B11001100 * 256) + B10101010; // B11001100 is the high byte
|
||||
|
||||
</pre>
|
||||
<p class='vspace'></p><p><strong>Octal</strong> is base eight. Only characters 0 through 7 are valid. Octal values are indicated by the prefix "0"
|
||||
</p>
|
||||
<p class='vspace'></p><p>Example:
|
@@ -0,0 +1,55 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - Interrupts </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><strong>Reference</strong> <a class='wikilink' href='index.html'>Language</a> | <a class='wikilink' href='Libraries.html'>Libraries</a> | <a class='wikilink' href='Comparison.html'>Comparison</a> | <a class='wikilink' href='Changes.html'>Changes</a>
|
@@ -0,0 +1,275 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - Keywords </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://www.arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://www.arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://www.arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://www.arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><strong>Reference</strong> <a class='wikilink' href='index.html'>Language</a> (<a class='wikilink' href='Extended.html'>extended</a>) | <a class='wikilink' href='Libraries.html'>Libraries</a> | <a class='wikilink' href='Comparison.html'>Comparison</a> | <a class='wikilink' href='Board.html'>Board</a>
|
||||
</p>
|
||||
<p class='vspace'></p><h2>Keywords</h2>
|
||||
<p>Keywords are constants, variables and function names that are defined as part of the Arduino language. Avoid using keywords for variable names.
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
<table width='90%' border='0' cellpadding='5' cellspacing='0'><tr><td width='33%' valign='top'>
|
||||
<pre>
|
||||
# Constants
|
||||
|
||||
HIGH
|
||||
LOW
|
||||
INPUT
|
||||
OUTPUT
|
||||
SERIAL
|
||||
DISPLAY
|
||||
PI
|
||||
HALF_PI
|
||||
TWO_PI
|
||||
LSBFIRST
|
||||
MSBFIRST
|
||||
CHANGE
|
||||
FALLING
|
||||
RISING
|
||||
false
|
||||
true
|
||||
null
|
||||
|
||||
# Port Variables & Constants
|
||||
|
||||
DDRB
|
||||
PINB
|
||||
PORTB
|
||||
PB0
|
||||
PB1
|
||||
PB2
|
||||
PB3
|
||||
PB4
|
||||
PB5
|
||||
PB6
|
||||
PB7
|
||||
|
||||
DDRC
|
||||
PINC
|
||||
PORTC
|
||||
PC0
|
||||
PC1
|
||||
PC2
|
||||
PC3
|
||||
PC4
|
||||
PC5
|
||||
PC6
|
||||
PC7
|
||||
|
||||
DDRD
|
||||
PIND
|
||||
PORTD
|
||||
PD0
|
||||
PD1
|
||||
PD2
|
||||
PD3
|
||||
PD4
|
||||
PD5
|
||||
PD6
|
||||
PD7
|
||||
|
||||
# Datatypes
|
||||
|
||||
boolean
|
||||
byte
|
||||
char
|
||||
class
|
||||
default
|
||||
do
|
||||
double
|
||||
int
|
||||
long
|
||||
|
||||
</pre></td><td width='33%' valign='top'>
|
||||
<pre>
|
||||
private
|
||||
protected
|
||||
public
|
||||
return
|
||||
short
|
||||
signed
|
||||
static
|
||||
switch
|
||||
throw
|
||||
try
|
||||
unsigned
|
||||
void
|
||||
|
||||
# Other
|
||||
|
||||
abs
|
||||
acos
|
||||
+=
|
||||
+
|
||||
[]
|
||||
asin
|
||||
=
|
||||
atan
|
||||
atan2
|
||||
&
|
||||
|
|
||||
boolean
|
||||
byte
|
||||
case
|
||||
ceil
|
||||
char
|
||||
char
|
||||
class
|
||||
,
|
||||
//
|
||||
?:
|
||||
constrain
|
||||
cos
|
||||
{}
|
||||
--
|
||||
default
|
||||
delay
|
||||
delayMicroseconds
|
||||
/
|
||||
/**
|
||||
.
|
||||
else
|
||||
==
|
||||
exp
|
||||
false
|
||||
float
|
||||
float
|
||||
floor
|
||||
for
|
||||
<
|
||||
<=
|
||||
HALF_PI
|
||||
if
|
||||
++
|
||||
!=
|
||||
int
|
||||
<<
|
||||
<
|
||||
<=
|
||||
log
|
||||
&&
|
||||
!
|
||||
||
|
||||
|
||||
|
||||
</pre>
|
||||
<p class='vspace'></p></td><td width='33%' valign='top'>
|
||||
<p class='vspace'></p><pre>
|
||||
|
||||
loop
|
||||
max
|
||||
millis
|
||||
min
|
||||
-
|
||||
%
|
||||
/*
|
||||
*
|
||||
new
|
||||
null
|
||||
()
|
||||
PI
|
||||
return
|
||||
>>
|
||||
;
|
||||
Serial
|
||||
Setup
|
||||
sin
|
||||
sq
|
||||
sqrt
|
||||
-=
|
||||
switch
|
||||
tan
|
||||
this
|
||||
true
|
||||
TWO_PI
|
||||
void
|
||||
while
|
||||
Serial
|
||||
begin
|
||||
read
|
||||
print
|
||||
write
|
||||
println
|
||||
available
|
||||
digitalWrite
|
||||
digitalRead
|
||||
pinMode
|
||||
analogRead
|
||||
analogWrite
|
||||
attachInterrupts
|
||||
detachInterrupts
|
||||
beginSerial
|
||||
serialWrite
|
||||
serialRead
|
||||
serialAvailable
|
||||
printString
|
||||
printInteger
|
||||
printByte
|
||||
printHex
|
||||
printOctal
|
||||
printBinary
|
||||
printNewline
|
||||
pulseIn
|
||||
shiftOut
|
||||
|
||||
</pre></td></tr></table>
|
||||
<p class='vspace'></p><p><a class='wikilink' href='index.html'>Reference Home</a>
|
||||
</p>
|
||||
<p class='vspace'></p><p><em>Corrections, suggestions, and new documentation should be posted to the <a class='urllink' href='http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?board=swbugs' rel='nofollow'>Forum</a>.</em>
|
||||
</p>
|
||||
<p class='vspace'></p><p>The text of the Arduino reference is licensed under a
|
||||
<a class='urllink' href='http://creativecommons.org/licenses/by-sa/3.0/' rel='nofollow'>Creative Commons Attribution-ShareAlike 3.0 License</a>. Code samples in the reference are released into the public domain.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!--PageFooterFmt-->
|
@@ -0,0 +1,84 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Arduino - Libraries </title>
|
||||
<link rel='stylesheet' href='arduino.css' type='text/css' />
|
||||
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<!--PageHeaderFmt-->
|
||||
<div id="pageheader">
|
||||
<div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
|
||||
<div class="search">
|
||||
<!-- SiteSearch Google -->
|
||||
<FORM method=GET action="http://www.google.com/search">
|
||||
<input type=hidden name=ie value=UTF-8>
|
||||
<input type=hidden name=oe value=UTF-8>
|
||||
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
|
||||
<INPUT type=submit name=btnG VALUE="search">
|
||||
<input type=hidden name=domains value="http://www.arduino.cc/">
|
||||
<input type=hidden name=sitesearch value="http://www.arduino.cc/">
|
||||
</FORM>
|
||||
<!-- SiteSearch Google -->
|
||||
</div>
|
||||
</div>
|
||||
<!--/PageHeaderFmt-->
|
||||
<!--PageLeftFmt-->
|
||||
<div id="pagenav" style="text-align: right">
|
||||
<div style="float: left;">
|
||||
<p><a class='wikilink' href='http://arduino.cc/en/Main/Buy'>Buy</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Software'>Download</a>
|
||||
|
|
||||
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Tutorial/HomePage'>Learning</a>
|
||||
|
|
||||
<a class='wikilink' href='index.html'>Reference</a>
|
||||
|
|
||||
<a class='wikilink' href='http://arduino.cc/en/Main/Hardware'>Hardware</a>
|
||||
|
|
||||
<a class='wikilink' href='FAQ.html'>FAQ</a>
|
||||
</p>
|
||||
<p class='vspace'></p>
|
||||
|
||||
</div>
|
||||
<a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum »</a> |
|
||||
<a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground »</a>
|
||||
</div>
|
||||
<!--/PageLeftFmt-->
|
||||
<div id="pagetext">
|
||||
<!--PageText-->
|
||||
<div id='wikitext'>
|
||||
<p><strong>Reference</strong> <a class='wikilink' href='index.html'>Language</a> | <a class='selflink' href='Libraries.html'>Libraries</a> | <a class='wikilink' href='Comparison.html'>Comparison</a> | <a class='wikilink' href='Changes.html'>Changes</a>
|
||||
</p>
|
||||
<p class='vspace'></p><h2>Libraries</h2>
|
||||
<p>Libraries provide extra functionality for use in sketches, e.g. working with hardware or manipulating data. To use a library in a sketch, select it from <strong>Sketch > Import Library</strong>.
|
||||
</p>
|
||||
<p class='vspace'></p><h3>Standard Libraries</h3>
|
||||
<ul><li><a class='wikilink' href='EEPROM.html'>EEPROM</a> - reading and writing to "permanent" storage
|
||||
</li><li><a class='wikilink' href='Ethernet.html'>Ethernet</a> - for connecting to the internet using the Arduino Ethernet Shield
|
||||
</li><li><a class='wikilink' href='Firmata.html'>Firmata</a> - for communicating with applications on the computer using a standard serial protocol.
|
||||
</li><li><a class='wikilink' href='LiquidCrystal.html'>LiquidCrystal</a> - for controlling liquid crystal displays (<span class='wikiword'>LCDs</span>)
|
||||
</li><li><a class='wikilink' href='Servo.html'>Servo</a> - for controlling servo motors
|
||||
</li><li><a class='wikilink' href='SoftwareSerial.html'>SoftwareSerial</a> - for serial communication on any digital pins
|
||||
</li><li><a class='wikilink' href='SPI.html'>SPI</a> - for communicating with SPI devices
|
||||
</li><li><a class='wikilink' href='Stepper.html'>Stepper</a> - for controlling stepper motors
|
||||
</li><li><a class='wikilink' href='Wire.html'>Wire</a> - Two Wire Interface (<span class='wikiword'>TWI/I2C</span>) for sending and receiving data over a net of devices or sensors.
|
||||
</li></ul><p class='vspace'></p><p>These libraries are compatible Wiring versions, and the links below point to the (excellent) Wiring documentation.
|
||||
</p>
|
||||
<p class='vspace'></p><ul><li><a class='urllink' href='http://wiring.org.co/reference/libraries/Matrix/index.html' rel='nofollow'>Matrix</a> - Basic LED Matrix display manipulation library
|
||||
</li><li><a class='urllink' href='http://wiring.org.co/reference/libraries/Sprite/index.html' rel='nofollow'>Sprite</a> - Basic image sprite manipulation library for use in animations with an LED matrix
|
||||
</li></ul><p class='vspace'></p><h3>Contributed Libraries</h3>
|
||||
<p>If you're using one of these libraries, you need to install it first. To do so, download the library and unzip it. It should be in a folder of its own, and will typically contain at least two files, one with a .h suffix and one with a .cpp suffix. Open your Arduino sketchbook folder. If there is already a folder there called <strong>libraries</strong>, place the library folder in there. If not, create a folder called <strong>libraries</strong> in the sketchbook folder, and drop the library folder in there. Then re-start the Arduino programming environment, and you should see your new library in the <strong>Sketch > Import Library</strong> menu.
|
||||
</p>
|
||||
<p class='vspace'></p><p>For details, see the page on <a class='wikilink' href='Guide_Environment#libraries.html'>the Arduino environment</a>.
|
||||
</p>
|
||||
<p class='vspace'></p><p>Communication (networking and protocols):
|
||||
</p><ul><li><a class='urllink' href='http://www.arduino.cc/playground/Code/Messenger' rel='nofollow'>Messenger</a> - for processing text-based messages from the computer
|
||||
</li><li><a class='urllink' href='http://sundial.org/arduino/index.php/newsoftserial/' rel='nofollow'>NewSoftSerial</a> - an improved version of the <span class='wikiword'>SoftwareSerial</span> library
|
||||
</li><li><a class='urllink' href='http://www.arduino.cc/playground/Learning/OneWire' rel='nofollow'>OneWire</a> - control devices (from Dallas Semiconductor) that use the One Wire protocol.
|
||||
</li><li><a class='urllink' href='http://www.arduino.cc/playground/Main/PS2Keyboard' rel='nofollow'>PS2Keyboard</a> - read characters from a <span class='wikiword'>PS2</span> keyboard.
|
||||
</li><li><a class='urllink' href='http://www.arduino.cc/playground/Code/SimpleMessageSystem' rel='nofollow'>Simple Message System</a> - send messages between Arduino and the computer
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user