

Let’s use some code to scroll through all the possible character values and display their ASCII values as well. This command simply prints whatever is inside its parentheses to the LCD screen and then goes to the next line on the LCD in case there will be more sparki.println( ) commands. Now that you feel comfortable with the basic LCD commands let’s display some characters. We’ll be using the sparki.println( ) command to display our characters. If you want more information about the LCD screen click here. These are just the basics needed to get started with the LCD. The reason this line of code is in our program is because if we were displaying different data each time through loop then the characters displayed on Sparki’s LCD would go by so quickly we wouldn’t even be able to see them!
#CHAR MATH ARDUINO SERIAL#
Check out the chart below to get comfortable with characters before we move on.įor Sparki, characters are useful when printing text out on the LCD screen or over a Serial port. That explains why you can get the value ‘a’ by creating a character variable with the value ‘a’ or 97. Inside of Sparki’s little robotic brain all the characters get converted to the ASCII value when Sparki is doing any calculations or actions with a character. ASCII Values ASCII stands for American Standard Code for Information Interchange.

Each character has a number which equals letter, number, punctuation mark or image that is the character’s value. If you look at the chart below you’ll see that there is a musical note and a sun. Characters variable values can be equal to almost any single letter, number or punctuation mark you can type with your keyboard and some special characters that you probably can’t even make using your keyboard! Here’s what we’ll be covering on this page:
