Recent Changes - Search:

TEAMS Academy Wiki

Explore TEAMS!
for visiting sophomores & juniors

Robotics

EnvBioTech

Bat Design

Assistive Tech


Students


Instructors

TEAMS Forum

TEAMS Calendar

TEAMS Web Site

Wiki Info

edit Student.SideBar

HelloWorld

// Include the Command Module API

  1. include "create.h"

// 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)

Edit - History - Print - Recent Changes - Search
Page last modified on November 02, 2007, at 08:18 AM