getCdsColor

int getCdsColor(bool start)

Gets the color detected by the CdS cell. The thresholds assume a red filter is used.

Return

2 for red, 1 for blue, and 0 for no light.

Parameters
  • start: If true, the start light threshold will be used. If false, the jukebox light threshold will be used.

Examples

1
while(getCdsColor(true) == 0);

Waits until the a light is detected, using the start light threshold.


1
int cdsValue = getCdsColor(false);

Gets the light color (or no light), using the jukebox light threshold.

Function Variables

No function variables are used.