Recap of Characters

What We’ve Covered So Far

Declaring a character variable:

Changing a character variable:

Declaring and assigning a character variable at the same time:

Doing math with a character variable:

ASCII values: Each character value has a special integer called an ASCII value that corresponds to the character.

Questions and Activities to Try

1. See if you can use the image characters to write a simple story. For example-


2. Using the LCD code we covered try using the command sparki.print( ) instead of sparki.println( ). See if you can spell your name out by creating a bunch of different character variables with letter stored in them. What about doing it with ASCII values inside the sparki.print( ) commands instead of letters? (Hint, you’ll need to change the numbers in to characters kind of like how we changed the characters into a number above. An example of that code is shown below.) 3. How about writing your name using just one character variable? You’ll need to do math to the variable between each time you use the sparki.print( ) commands, unless your name only has one letter!

Next Step-

But characters don’t sound very useful on their own. To spell things, we need to have more than one of them in a row and there must be an easier way using a whole bunch of sparki.print( ) commands. How do we do that? With Arrays!

Next Lesson – Arrays