1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-13 23:48:46 +01:00
Arduino/build/linux/work/reference/index.html
2012-04-06 12:59:54 +02:00

251 lines
14 KiB
HTML

<!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 - Reference </title>
<link rel="shortcut icon" type="image/x-icon" href="http://arduino.cc/en/favicon.png">
<link rel='stylesheet' href='arduinoWideRender.css'
type='text/css' />
<!--HeaderText--><style type='text/css'><!--
ul, ol, pre, dl, p { margin-top:0px; margin-bottom:0px; }
code { white-space: nowrap; }
.vspace { margin-top:1.33em; }
.indent { margin-left:40px; }
.outdent { margin-left:40px; text-indent:-40px; }
a.createlinktext { text-decoration:none; border-bottom:1px dotted gray; }
a.createlink { text-decoration:none; position:relative; top:-0.5em;
font-weight:bold; font-size:smaller; border-bottom:none; }
img { border:0px; }
.editconflict { color:green;
font-style:italic; margin-top:1.33em; margin-bottom:1.33em; }
table.markup { border: 2px dotted #ccf; width:90%; }
td.markup1, td.markup2 { padding-left:10px; padding-right:10px; }
td.markup1 { border-bottom: 1px solid #ccf; }
div.faq { margin-left:2em; }
div.faq p.question { margin: 1em 0 0.75em -2em; font-weight:bold; }
div.faq hr { margin-left: -2em; }
.frame
{ border:1px solid #cccccc; padding:4px; background-color:#f9f9f9; }
.lfloat { float:left; margin-right:0.5em; }
.rfloat { float:right; margin-left:0.5em; }
a.varlink { text-decoration:none; }
--></style> <meta name='robots' content='index,follow' />
<meta name="verify-v1" content="TtxFIEJAB6zdJ509wLxjnapQzKAMNm9u0Wj4ho6wxIY=" />
</head>
<body>
<div id="page">
<!--PageHeaderFmt-->
<div id="pageheader">
<div class="title"><a href='http://arduino.cc/en'>Arduino</a></div>
</div>
<!--/PageHeaderFmt-->
<!--PageLeftFmt-->
<div id="pagenav">
<div id="navbar">
<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='selflink' 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>
</div>
<!--/PageLeftFmt-->
<div id="pagetext">
<!--PageText-->
<div id='wikitext'>
<p><strong>Reference</strong> &nbsp; <a class='selflink' 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>Language Reference</h1>
<p>Arduino programs can be divided in three main parts: <em>structure</em>, <em>values</em> (variables and constants), and <em>functions</em>.
</p>
<p class='vspace'></p>
<table width='100%' border='0' cellpadding='5' cellspacing='0'><tr><td width='33%' valign='top'>
<h2>Structure</h2>
<ul><li><a class='wikilink' href='Setup.html'>setup</a>()
</li><li><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'>+&nbsp;</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'>&lt;</a> (less than)
</li><li><a class='wikilink' href='If.html'>&gt;</a> (greater than)
</li><li><a class='wikilink' href='If.html'>&lt;=</a> (less than or equal to)
</li><li><a class='wikilink' href='If.html'>&gt;=</a> (greater than or equal to)
</li></ul><p class='vspace'></p><h4>Boolean Operators</h4>
<ul><li><a class='wikilink' href='Boolean.html'>&amp;&amp;</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'>&amp; reference operator</a>
</li></ul><p class='vspace'></p><h4>Bitwise Operators</h4>
<ul><li><a class='wikilink' href='BitwiseAnd.html'>&amp;</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'>&lt;&lt;</a> (bitshift left)
</li><li><a class='wikilink' href='Bitshift.html'>&gt;&gt;</a> (bitshift right)
</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='BitwiseCompoundAnd.html'>&amp;=</a> (compound bitwise and)
</li><li><a class='wikilink' href='BitwiseCompoundOr.html'>|=</a> (compound bitwise or)
</li></ul><p class='vspace'></p></td><td width='33%' valign='top'>
<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</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> - char array
</li><li><a class='wikilink' href='StringObject.html'>String</a> - object
</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 &amp; 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>()
</li></ul><p class='vspace'></p></td><td width='33%' 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>()
</li><li><a class='wikilink' href='DigitalWrite.html'>digitalWrite</a>()
</li><li><a class='wikilink' href='DigitalRead.html'>digitalRead</a>()
</li></ul><p class='vspace'></p><p><strong>Analog I/O</strong>
</p><ul><li><a class='wikilink' href='AnalogReference.html'>analogReference</a>()
</li><li><a class='wikilink' href='AnalogRead.html'>analogRead</a>()
</li><li><a class='wikilink' href='AnalogWrite.html'>analogWrite</a>() - <em>PWM</em>
</li></ul><p class='vspace'></p><p><strong>Advanced I/O</strong>
</p><ul><li><a class='wikilink' href='Tone.html'>tone</a>()
</li><li><a class='wikilink' href='NoTone.html'>noTone</a>()
</li><li><a class='wikilink' href='ShiftOut.html'>shiftOut</a>()
</li><li><a class='wikilink' href='ShiftIn.html'>shiftIn</a>()
</li><li><a class='wikilink' href='PulseIn.html'>pulseIn</a>()
</li></ul><p class='vspace'></p><p><strong>Time</strong>
</p><ul><li><a class='wikilink' href='Millis.html'>millis</a>()
</li><li><a class='wikilink' href='Micros.html'>micros</a>()
</li><li><a class='wikilink' href='Delay.html'>delay</a>()
</li><li><a class='wikilink' href='DelayMicroseconds.html'>delayMicroseconds</a>()
</li></ul><p class='vspace'></p><p><strong>Math</strong>
</p><ul><li><a class='wikilink' href='Min.html'>min</a>()
</li><li><a class='wikilink' href='Max.html'>max</a>()
</li><li><a class='wikilink' href='Abs.html'>abs</a>()
</li><li><a class='wikilink' href='Constrain.html'>constrain</a>()
</li><li><a class='wikilink' href='Map.html'>map</a>()
</li><li><a class='wikilink' href='Pow.html'>pow</a>()
</li><li><a class='wikilink' href='Sqrt.html'>sqrt</a>()
</li></ul><p class='vspace'></p><p><strong>Trigonometry</strong>
</p><ul><li><a class='wikilink' href='Sin.html'>sin</a>()
</li><li><a class='wikilink' href='Cos.html'>cos</a>()
</li><li><a class='wikilink' href='Tan.html'>tan</a>()
</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>()
</li><li><a class='wikilink' href='Random.html'>random</a>()
</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>()
</li><li><a class='wikilink' href='DetachInterrupt.html'>detachInterrupt</a>()
</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> See the <a class='wikilink' href='Libraries.html'>libraries page</a> for interfacing with particular types of hardware. Try the list of <a class='urllink' href='http://www.arduino.cc/playground/Main/GeneralCodeLibrary' rel='nofollow'>community-contributed code</a>. The Arduino language is based on C/C++. It links against <a class='urllink' href='http://www.nongnu.org/avr-libc/user-manual/modules.html' 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></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://arduino.cc/forum/index.php/board,23.0.html' 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-->
<div id="pagefooter">
&copy;Arduino |
<a href='#'>Edit Page</a> | <a href='#'>Page History</a> | <a href='#' target='_blank'>Printable View</a> | <a href='http://arduino.cc/en/Site/AllRecentChanges'>All Recent Site Changes</a>
</div>
<!--/PageFooterFmt-->
</div>
</body>
</html>