Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
33 lines (27 sloc) 1.17 KB
#include "grabber_controller.h"
task display_sensor_values()
{
while(TRUE)
{
update_sensors();
TextOut(0, LCD_LINE1, "Sensor Values:"); // outputs text in the first row of the LCD display
TextOut(0, LCD_LINE4, "Light:");
NumOut(50, LCD_LINE4, sensors.light_value); // outputs light sensor values in the 4. row of the LCD display
TextOut(0, LCD_LINE5, "color:");
NumOut(50, LCD_LINE5, sensors.color_value); // outputs color sensor values in the 5. row of the LCD display
TextOut(10, LCD_LINE6, "r:");
NumOut(50, LCD_LINE6, sensors.color_red); // outputs color sensor values in the 6. row of the LCD display
TextOut(10, LCD_LINE7, "g:");
NumOut(50, LCD_LINE7, sensors.color_green); // outputs color sensor values in the 7. row of the LCD display
TextOut(10, LCD_LINE8, "b:");
NumOut(50, LCD_LINE8, sensors.color_blue); // outputs color sensor values in the 8. row of the LCD display
Wait(250);
ClearScreen();
}
}
task main()
{
init_grabber_controller();
// start executing the two tasks
//Precedes(display_sensor_values);
}