Seriously, the Arduino language is merely a set of C/C++ functions and does not forget it’s code but in fact it’s me that keeps forgetting on how to do some of the simple things due to my medication, so here is my forgetful list of Arduino code snippets that I refer back to.
For with Step value
For statement with a step value increment. In this snippet we will step in increments of 10 starting at 0 and finishing at 100.
for (i = 0; i<=100; i += 10) {
// Do work here
}
If And If Statement
If statement and an additional If statement.
if ((q1 == true) && (q2 == true)) {
// Do work here
}
If Or If Statement
If statement and an additional If statement.
if ((q1 == true) || (q2 == true)) {
// Do work here
}