Arduino编程参考手册(多页面版)
setup()
loop()
if
if...else
for
switch case
while
do...while
break
continue
return
goto
; (分号)
{} (大括号)
// (单行注释)
/**/ (多行注释)
#define
#include
=(赋值运算符)
- (加)
- (减)
- (乘)
/ (除)
% (取模)
== 等于
!= (不等于)
< (小于)
> (大于)
<= (小于等于)
>= (大于等于)
&& (与)
|| (或)
! (非)
- 指针运算符
& 地址运算符
& (位与)
| (位或)
^ (位异或)
~ (位非)
<< (左移)
>> (右移)
++ (自加)
-- (自减)
+= (复合加)
-= (复合减)
*= (复合乘)
/= (复合除)
&= (复合位与)
|= (复合位或)
HIGH | LOW
INPUT | OUTPUT
true | false
整型常量
浮点数常量
void
boolean
char
unsigned char
byte
int
unsigned int
word
long
unsigned long
float
double
string
array
char()
byte()
int()
word()
long()
float()
变量作用域
static (静态变量)
volatile (易变变量)
const (不可改变变量)
sizeof() (sizeof运算符)
ASCII码表
pinMode()
digitalWrite()
digitalRead()
analogReference()
analogRead()
analogWrite()
shiftOut()
pulseIn()
millis()
delay(ms)
delayMicroseconds(us)
min()
max()
abs()
constrain()
map()
pow()
sqrt()
sin(rad)
cos(rad)
tan(rad)
randomSeed()
random()
lowByte()
highByte()
bitRead()
bitWrite()
bitSet()
bitClear()
bit()
attachInterrupt()
detachInterrupt()
interrupts()
noInterrupts()
Serial