703
edits
mNo edit summary |
|||
Line 24: | Line 24: | ||
* introduce the concept of variables. | * introduce the concept of variables. | ||
* introduce | * introduce 2 function: random() and analogWrite | ||
* | * if we are fast: analogRead() and Serial communication basics | ||
Introducing variables. | Introducing variables. | ||
int (means an integer number: 0 1 2 3 4 5 6 ... and also negative numbers. limits: -32,768 to 32,767 | * int (means an integer number: 0 1 2 3 4 5 6 ... and also negative numbers. limits: -32,768 to 32,767 | ||
there are other kinds of variables. we only use int for simplicity in this lesson. | * there are other kinds of variables. we only use int for simplicity in this lesson. | ||
valid names for variables: otto, lemonade24 | ** In your homework: see other types of variables. | ||
not allowed names for variables: ööö äää 1234Otto (must start with an alphanumeric character) | |||
Names of Variables: | |||
valid names for variables: examples: otto, lemonade24, pudding, pinNumber, pin_Number | |||
not allowed names for variables: ööö äää 1234Otto (It must start with an alphanumeric character) | |||
better names for variables: delayTimeOff, pinNumber, delayTimeOn | better names for variables: delayTimeOff, pinNumber, delayTimeOn | ||
edits