函数参考

http://wiring.org.co/reference/

|

Structure

[] (array access)
= (assign)
, (comma)
// (comment)
{} (curly braces)
#define
delete
. (dot)
false
#include
loop()
/ / (multiline comment)
new
null
() (parentheses)
return
; (semicolon)
setup()
true
void

Control

Relational Operators

== (equality)
> (greater than)
>= (greater than or equal to)
!= (inequality)
< (less than)
<= (less than or equal to)

Iteration

for()
while()

Conditionals
break
case
default
else
if()
switch()

Logical Operators

&& (logical AND)
! (logical NOT)
|| (logical OR) |

Data

Primitive

boolean
byte
char
double
float
int
long
unsigned char
unsigned int
unsigned long
word

Composite
String
Vector
array

Constant Types

ByteTable
CharTable
Constant
ConstantString
DoubleTable
FloatTable
IntTable
LongTable
UCharTable
UIntTable
ULongTable
Conversion

byte()
char()
float()
int()
long()
splitString()
toAscii()
toLowerCase()
toUpperCase()

Bit, byte and word handling

bit()
bitRead()
bitWrite()
highByte()
lowByte()
makeWord()
Character classification

isAlpha()
isAlphaNumeric()
isAscii()
isControl()
isDigit()
isGraph()
isHexadecimalDigit()
isLowerCase()
isPrintable()
isPunct()
isSpace()
isUpperCase()
isWhitespace()
Qualifiers

const
static
volatile
Pointer Operators

* (dereference operator)
& (reference operator)
Utilities

sizeof()

|

Input/Output

Pin digital Input/Output

digitalRead()
digitalWrite()
pinMode()

Pin digital Input pullup

noPullup()
pullup()

Port digital Input/Output
portMode()
portRead()
portWrite()
Pin Bit Shifting

shiftIn()
shiftOut()
Pin analog Input

analogRead()
analogReference()
Pin PWM (analog) Output

analogWrite()
noAnalogWrite()

Pin PWM Advanced Settings
setPWMPrescale()
setPWMResolution()

Time
delay()
delayMicroseconds()
micros()
millis()
Pulse Input (polled)

pulseIn()
Interrupts

attachInterrupt()
detachInterrupt()
interruptMode()
interrupts()
noInterrupts()

Tone output generation
getTonePolyphony()
noTone()
setTonePolyphony()
tone()

Serial Communication
Serial

Power Management
disablePower()
enablePower()

Advanced Power Management
noSleep()
sleep()
sleepMode()

Constants

CHANGE
FALLING
HALF_PI (1.57079…)
HIGH
INPUT
LOW
LSBFIRST
MSBFIRST
OUTPUT
PI (3.14159…)
RISING
TWO_PI (6.28318…)
WLED |

Math

Operators

+= (add assign)
-= (subtract assign)

Bitwise Operators
& (bitwise AND)
&= (bitwise AND and assign)
| (bitwise OR)
|= (bitwise OR and assign)
^ (bitwise XOR)
<< (bitwise bit shift left)
>> (bitwise bit shift right)
˜ (bitwise ones complement)
Calculation

abs()
ceil()
constrain()
exp()
fabs()
floor()
fma()
fmax()
fmin()
fmod()
ldexp()
log()
log10()
map()
max()
min()
pow()
round()
signbit()
sq()
sqrt()
square()
trunc()

Trigonometry
acos()
asin()
atan()
atan2()
cos()
cosh()
degrees()
hypot()
radians()
sin()
sinh()
tan()
tanh()

Random
random()
randomSeed()

Operator
+ (addition)
— (decrement)
/ (divide)
++ (increment)
- (minus)
% (modulo)
* (multiply)
- (negation)



| | —- | —- | —- | —- |


[

](http://wiring.org.co/reference/WLED.html)