Appendix E. Programming Constructs
The code in this book takes advantage of a number of Arduino functions that are summarized in this appendix. See the online Arduino reference for each function if you want more detail.
Digital I/O
pinMode(pin, mode);
Configures a digital pin to read (input) or write (output) a digital value; see http://arduino.cc/en/Reference/PinMode
digitalRead(pin);
Reads a digital value (HIGH or LOW) on a pin set for input; see http://arduino.cc/en/Reference/DigitalRead
digitalWrite(pin, value);
Writes the digital value (HIGH or LOW) to a pin set for output; see http://arduino.cc/en/Reference/DigitalWrite
pulseIn(pin, pulseType, timeout);
Returns the pulse width in microseconds of a changing digital signal on the given pin.
pulseType ...
Get Make an Arduino-Controlled Robot now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.