ColorView class Reference
Skittle Color Sorter

class ColorView

extends Context

Class defines how the Skittle's color results are showed on the LED.

protected Attributes

  • C_Color mColor
  • The result to show.
  • boolean bDirty
  • Does color view need to refresh.

public Functions

  • ColorView ()
  • Constructor. Initialize members.
  • void update ()
  • Updates the color view logic. This function should be called on the arduino's main loop.
  • void setColor (const C_Color &color)
  • Set the color view to show a desired color.
  • void setColorByResult (const colorResult &result)
  • Set the color view to show a disired result.

protected Functions

  • void write (const C_Color &c)
  • Writes a desired color to the LED. This sets the LED's color by writing analog color values to the LED.