Recent Changes - Search:

TEAMS Academy Wiki

THS

Explore TEAMS!
for visiting sophomores & juniors

Bodies & Bones

Interactive Robotics

Environmental BioTech

Bat Engineering Design

Assistive Technology & Electronics

Students (Forum)

Instructors

School Calendar

FY09 Planning

TEAMS Web Site

Wiki Info

edit SideBar

WikiSandbox

Feel free to use this page to experiment with the Text Formatting Rules. Just click the "Edit Page" link at the bottom of the page.

TableHeadingExample
!LeftCenterRight
Aa BC
 single 
 multi span

Defining New Styles

You can use WikiStyles to change the format of text in many ways.
Below, I have created my own complex WikiStyle, which displays the text inside a red box.

%define=attnbox1 block margin="10px 5pc 10px 2pc" border='2px solid red'
text-align=center bgcolor=#00ccff padding=10px%

Now I'll use it to create a warning message.

Be careful when naming new wiki pages!
A name like "Favorite Sports" is common, and many people may try to use it for personal pages.
Click here for more information.


code inserts

// Include the Command Module API
#include "create.h"

// Pointer to the cr8_t struct
cr8_t *cr8;

// Main function
int main(void)
{
  cr8 = cr8_alloc();
  // Initialize the Create and Command Module
  cr8_init(cr8);

  //Update cr8
  cr8_update(cr8);

  while(1)
  {
    cr8_set_leds(0,1,0,0);  


	// Drive forward without hitting wall
	while (cr8->wall_range < 120 && cr8->wall_range > 4)
	{
        cr8_set_leds(1,1,0,0);

		// Set the linear and angular speed of the Create to 200mm/s linear and 0 mr/s angular.
		cr8_set_speed(200, 0);

		//Update again
		cr8_update(cr8);

		cr8_delay(15);	
	}

	if (cr8->wall_range < 4)
		{
		   cr8_set_speed(0,0);  //stop
		   cr8_set_leds(0,0,0,0);
		   // cr8_beep_short();          //beep and

			cr8_set_speed(50, -70);  //turn right if wall seems too far away


		}	

   	else if (cr8->wall_range > 120)
		{
		    cr8_set_leds(1,0,0,0);
			//cr8_beep_long(); 			//beep and

			cr8_set_speed(60, 70);  //turn left if wall seems too close


		}

	cr8_update(cr8);
  	cr8_delay(50);
	cr8_set_speed(0,0);
	//cr8_beep_short();
  }

  cr8_free(cr8);

  return 0;
}

Defining New Styles

You can use WikiStyles to change the format of text in many ways.
Below, I have created my own complex WikiStyle, which displays the text inside a red box.

%define=attnbox block margin="10px 5pc 10px 5pc" border='2px solid red'
text-align=center bgcolor=#ffdddd padding=10px%

Now I'll use it to create a warning message.

Be careful when naming new wiki pages!
A name like "Favorite Sports" is common, and many people may try to use it for personal pages.
Click here for more information.

Edit - History - Print - Recent Changes - Search
Page last modified on September 28, 2007, at 08:37 AM