|
Explore TEAMS!
|
Student /
HelloWorld// Include the Command Module API
// Pointer to the Sensor Data structure cr8_t *cr8; // Main function int main(void) { // Allocate memory for sensor data structure cr8 = cr8_alloc(); // Initialize the Create and Command Module // Sync communications settings. cr8_init(cr8); // Start Robot Code Here // // // Garcia Hello World // Red COhort // October 29, 2007 // Hello World will: // Create will beep for one second cr8_beep_long(); //The Play and Advance lights will turn on at full intensity and the play led will be red cr8_set_leds(1,1, 255, 255); //Delay one second cr8_delay(1000); // Create will beep for one half second cr8_beep_short(); //Create will keep leds on, play led will turn green cr8_set_leds(1,1,0,255); //Delay one second cr8_delay(1000); //The Play and Advance lights will turn on at full intensity and the play led will be red cr8_set_leds(1,1, 255, 255); //create will beep long cr8_beep_long(); // release the sensor data strucutre memory and exit the program cr8_free(cr8) |