Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
26 lines (19 sloc) 558 Bytes
#include "grabber_controller.h"
task main()
{
init_grabber_controller();
while(true)
{
update_sensors();
int light = floor_from_light(sensors.light_value);
TextOut(0, LCD_LINE1, "Sensor Values:");
if(light == FLOOR_WHITE)
TextOut(0, LCD_LINE3, " WHITE ");
else if(light == FLOOR_BLACK)
TextOut(0, LCD_LINE3, " BLACK ");
if(light == FLOOR_NULL)
do_beep_light_error();
Wait(50);
ClearScreen();
}
}