Datasheet
Your Shield-Bot’s Brain • Chapter 1
Robotics with the BOE Shield-Bot • 41
}
Serial.println("All done!");
}
void loop()
{
// Empty, no repeating code.
}
2. This sketch is a modified version of SimpleDecisions that uses a variation of the
solution from Exercise 3 to display whether the variable is odd or even.
// Robotics with the BOE Shield - Chapter 1, Project 2
void setup()
{
Serial.begin(9600);
int a = 20;
if(a % 2 == 0)
{
Serial.print("a is even");
}
else
{
Serial.print("a is odd");
}
}
void loop()
{
// Empty, no repeating code.
}