Data Types

  • numbers
    • byte 0 - 255
      • space saving! use this when possible!
    • int
      • handy for negative numbers and most other uses bigger than a byte
      • -32,768 to 32,767
    • long
      • -2,147,483,648 to 2,147,483,647
      • Four times bigger than a byte
      • Do you REALLY need numbers this size? Only use this when necessary
  • char
    • also a byte
    • but you can use ASCII characters instead of numbers
    • google for "ASCII table" to see what number is what character
    • Handy to know for sensors and other stuff that uses serial. Bytes = chars.
  • arrays
    • an array is a kind of list of other data types
    • can be any data type
    • can be set to be whatever size you need
    • arrays are numbered starting from 0
    • Let's play with this

Copyright Mike Edwards 2006-2009. All content available under the Creative Commons Attribution ShareAlike license, unless otherwise noted.