New Theme, Posting Unrestricted!

Jeremy Rand's picture

The long-rumored site redesign is finally here! Enjoy the new look, and please let us know if you encounter any issues.

In other good news, posting is now unrestricted and instant again. (Let us know if the new spam filter causes you any grief.)

-Jeremy Rand
YAC President

Comments

int

int main();
{
motor(0,100);//turn on motor in port 0 forward
motor(3,100);//turn on motor in port 3 forward
sleep(3.0); //wait for 3 seconds
ao(); //turn off both motors
mav(0,100); //turn on motor in port 0 forward
mav(3,-100);//turn on motor in port 3 backward
sleep(0.5); //wait for 0.5 seconds
ao(); //turn off both motors
}

/*Function definitions go below.*/

What is wrong with this code it is on KISS-C

We are trying to run this

We are trying to run this simple code to a cbc with 2 motors.

Marty Rand's picture

First, there should not be a

First, there should not be a ';' after 'int main'. Also, I assume you know that mav's speed is out of 1000 not 100? In the future post topics like this under the programming section

-Marty Rand
{
Senior programmer at Norman Advanced Robotics

Former senior programmer at Whittier Middle School

Youth Advisory Council

All around nerd
}