処理のブロックを示します。
Arduinoにおける文法は標準C言語 と特に変わりはありません。
● Example from Arduino Web Site
[c]
//関数
void myfunction(datatype argument){
statements(s)
}
[/c]
[c]
//ループ
while (boolean expression)
{
statement(s)
}
do
{
statement(s)
} while (boolean expression);
for (initialisation; termination condition; incrementing expr)
{
statement(s)
}
[/c]
[c]
//判断処理
if (boolean expression)
{
statement(s)
}
else if (boolean expression)
{
statement(s)
}
else
{
statement(s)
}
[/c]