“Arduino语法参考”的版本间的差异
来自YFRobotwiki
(→Arduino编程语法参考) |
(→Arduino编程语法参考) |
||
| 第22行: | 第22行: | ||
*[[; (分号)]] | *[[; (分号)]] | ||
*[[大括号|{} (大括号)]] | *[[大括号|{} (大括号)]] | ||
| − | *[[注释| // | + | *[[注释| // (单行注释) ]] |
| − | *[[注释| /* */ | + | *[[注释| /**/(多行注释)]] |
*[[ define|#define ]] | *[[ define|#define ]] | ||
*[[ include |#include ]] | *[[ include |#include ]] | ||
| 第67行: | 第67行: | ||
<font color="orange" size="+1">'''变量'''</font><br> | <font color="orange" size="+1">'''变量'''</font><br> | ||
<font color="orange" >'''常量'''</font> | <font color="orange" >'''常量'''</font> | ||
| − | *[[常量| | + | *[[常量|HIGH]]|[[常量|LOW]] |
| − | *[[常量|INPUT | OUTPUT | INPUT_PULLUP]] | + | *[[常量|INPUT]]|[[常量|OUTPUT]]|[[常量|INPUT_PULLUP]] |
*[[常量|LED_BUILTIN]] | *[[常量|LED_BUILTIN]] | ||
| − | *[[常量|true|false]] | + | *[[常量|true]]|[[常量|false]] |
| − | *[[integer constants]] | + | *[[integer constants (整型常量)]] |
| − | *[[floating point constants]] | + | *[[floating point constants (浮点型常量)]] |
| + | <font color="orange" >'''数据类型'''</font> | ||
| + | *[[void]] | ||
| + | *[[boolean]] | ||
| + | *[[char]] | ||
| + | *[[unsigned char]] | ||
| + | *[[byte]] | ||
| + | *[[int]] | ||
| + | *[[unsigned int]] | ||
| + | *[[word]] | ||
| + | *[[long]] | ||
| + | *[[unsigned long]] | ||
| + | *[[short]] | ||
| + | *[[float]] | ||
| + | *[[double]] | ||
| + | *[[string]]-char array | ||
| + | *[[string]]-object | ||
| + | *[[array]] | ||
| + | <font color="orange" >'''数据类型转换'''</font> | ||
| + | *[[char()]] | ||
| + | *[[byte()]] | ||
| + | *[[int()]] | ||
| + | *[[word()]] | ||
| + | *[[long()]] | ||
| + | *[[float()]] | ||
| + | <font color="orange" >'''变量作用域'''</font> | ||
| + | *[[variable scope]] | ||
| + | *[[static]] | ||
| + | *[[volatile]] | ||
| + | *[[const]] | ||
| + | <font color="orange" >'''辅助工具'''</font> | ||
| + | *[[sizeof()]] | ||
| + | *[[PROGMEM]] | ||
| + | |||
|width="33%" valign="top" align="left"| | |width="33%" valign="top" align="left"| | ||
<font color="orange" size="+1">'''函数'''</font><br> | <font color="orange" size="+1">'''函数'''</font><br> | ||
| − | <font color="orange" >'''数 | + | <font color="orange" >'''数 字I/O'''</font> |
*[[pinMode()]] | *[[pinMode()]] | ||
*[[digitalWrite()]] | *[[digitalWrite()]] | ||
*[[digitalRead()]] | *[[digitalRead()]] | ||
| + | <font color="orange" >'''模拟I/O'''</font> | ||
| + | *[[analogReference()]] | ||
| + | *[[analogRead()]] | ||
| + | *[[analogWrite()]] - PWM | ||
| + | <font color="orange" >'''只适用于Due & Zero板'''</font> | ||
| + | *[[analogReadResolution()]] | ||
| + | *[[analogWriteResolution()]] | ||
| + | <font color="orange" >'''高级I/O'''</font> | ||
| + | *[[tone()]] | ||
| + | *[[noTone()]] | ||
| + | *[[shiftOut()]] | ||
| + | *[[shiftIn()]] | ||
| + | *[[pulseIn()]] | ||
| + | <font color="orange" >'''时间'''</font> | ||
| + | *[[millis()]] | ||
| + | *[[micros()]] | ||
| + | *[[delay()]] | ||
| + | *[[delayMicroseconds()]] | ||
| + | <font color="orange" >'''数学'''</font> | ||
| + | *[[min()]] | ||
| + | *[[max()]] | ||
| + | *[[abs()]] | ||
| + | *[[constrain()]] | ||
| + | *[[map()]] | ||
| + | *[[pow()]] | ||
| + | *[[sqrt()]] | ||
| + | <font color="orange" >'''三角函数'''</font> | ||
| + | *[[sin()]] | ||
| + | *[[cos()]] | ||
| + | *[[tan()]] | ||
| + | <font color="orange" >'''随机数'''</font> | ||
| + | *[[randomSeed()]] | ||
| + | *[[random()]] | ||
| + | <font color="orange" >'''位操作'''</font> | ||
| + | *[[lowByte()]] | ||
| + | *[[highByte()]] | ||
| + | *[[bitRead()]] | ||
| + | *[[bitWrite()]] | ||
| + | *[[bitSet()]] | ||
| + | *[[bitClear()]] | ||
| + | *[[bit()]] | ||
| + | <font color="orange" >'''外部中断'''</font> | ||
| + | *[[attachInterrupt()]] | ||
| + | *[[detachInterrupt()]] | ||
| + | <font color="orange" >'''中断'''</font> | ||
| + | *[[interrupts()]] | ||
| + | *[[noInterrupts()]] | ||
| + | <font color="orange" >'''串口通信'''</font> | ||
| + | *[[Serial]] | ||
| + | *[[Stream]] | ||
| + | <font color="orange" >'''USB (仅适用于 基于芯片32u4的板和Due/Zero)'''</font> | ||
| + | *[[Keyboard]] | ||
| + | *[[Mouse]] | ||
| + | |||
|} | |} | ||
2015年6月4日 (四) 11:24的版本
Arduino官方语法参考
Arduino编程语法参考
|
结构 控制结构 扩展语法 算术运算符 比较运算符 布尔运算符 指针运算符 位运算符 复合运算符 |
变量
数据类型
数据类型转换 变量作用域 辅助工具 |
函数 模拟I/O 只适用于Due & Zero板 高级I/O 时间 数学 三角函数 随机数 位操作 外部中断 中断 串口通信 USB (仅适用于 基于芯片32u4的板和Due/Zero) |