pulseIn()
##definition
-
Reads a pulse (either HIGH or LOW) on a pin. For example, if value is HIGH, pulseIn() waits for the pin to go from LOW to HIGH, starts timing, then waits for the pin to go LOW and stops timing.
(account the time of HIGH mode)
-
it will return the length of the pulse
data type: unsigned long
Syntax
pulesIn(pin, value, timeout);
#define
##definition
- #define allows the programmer to give a name to a constant value before the program is compiled.
- const is better than #define, it should replace #define.
syntax
#define constantName value
warning
there is no ; after the code
#inculde
##definition
- #include allows you to use outside libraries in your code.
- the main reference page for arduino in here.
syntax
#include <Servo.h>
##warning
there is no ; after the code
2037

被折叠的 条评论
为什么被折叠?



