Wednesday, April 16, 2014

Circuit #3 RGB LED Notes

Goal: Make an RGB LED display a rainbow of colors.

const - "Constant" variable that will never change. Placed in front of variable declarations. ie. const int RED_PIN = 9

for( ) - Has three statements

  1. Something to do before starting
  2. A test to perform; as long as it is true, it will keep looping
  3. Something to do after each loop, usually increase a variable
RGB base numbers:
  • 0 = pure red
  • 255 = pure green
  • 511 = pure blue
  • 767 = pure red
Sources:
Vilros Ultimate Starter Kit Tutorial Sketches 1-12

No comments:

Post a Comment