// Function samples the ADC at 1 KHz
unsigned int port1, port2;
// Read in the desired analog ports
// Precise delay function accounts for the time taken by processing
// 1UL -> 1 ms (1 KHz), adjust as necessary for sensor used
// Note that rates over 1 KHz cannot be achieved using user mode, as this
// could starve the CPU. See the kernel mode drivers page for details.
// Called when the robot is powered on
// This will create a task that is always runnning, even if robot is disabled
// To run the sampling task in only one mode (autonomous() or operatorControl()),
// use taskRunLoop() instead.
taskCreate(sampleADC, TASK_DEFAULT_STACK_SIZE, NULL, TASK_PRIORITY_DEFAULT + 1, NULL);