Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
27 lines (19 sloc) 672 Bytes
#include "grabber_controller.h"
task main()
{
init_grabber_controller();
while(true)
{
update_sensors();
int object = object_from_color(sensors.color_value, sensors.color_red, sensors.color_green, sensors.color_blue);
TextOut(0, LCD_LINE1, "Sensor Values:"); // outputs text in the first row of the LCD display
if(object == OBJECT_RED)
TextOut(0, LCD_LINE3, " RED ");
else if(object == OBJECT_GREEN)
TextOut(0, LCD_LINE3, " GREEN ");
if(object != OBJECT_NULL)
do_beep_detected_object();
Wait(50);
ClearScreen();
}
}