Appendix C. Arduino Quick Reference

Here is a quick explanation of all the standard instructions supported by the Arduino language.

For a more detailed reference, see: arduino.cc/en/Reference/HomePage

Structure

An Arduino sketch runs in two parts:

void setup()

This is where you place the initialisation code—the instructions that set up the board before the main loop of the sketch starts.

void loop()

This contains the main code of your sketch. It contains a set of instructions that get repeated over and over until the board is switched off.

Special Symbols

Arduino includes a number of symbols to delineate lines of code, comments, and blocks of code.

; (semicolon)

Every instruction (line of code) is terminated by a semicolon. This syntax lets you format the ...

Get Getting Started with Arduino, 2nd Edition 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.