Sounds like you're missing a parenthesis. Can you post about 5-6 lines of the code surrounding the line where the error shows up? It's hard to diagnose without looking at the code.
-Jeremy Rand
Senior Programmer, Team SNARC (2012-2013), Norman Advanced (2010-2011), Norman HS (2008-2009), Norman North (2005-2007), Whittier MS (2003-2004)
2012-2013 VP of Tech, 2011 President, Botball YAC (2009-2013)
Mentor, Alcott and Whittier MS
Thank You for getting back to me! here are five lines of our program.
int main();
{
int printf("Drive Straight\n"); // announce the program
sleep(1.0); // wait 1 second
while (create_connect()); // Open the connection between CBC and Create
// As long as the create has not driven 1m
while (get_create_distance(0.5) < 200)
{
create_drive_direct(500,500); // Drive forward at 250mm/sec
}
Also we are trying to add the motors into our program but we are unsure how to get it, here is our program so far, included what we THINK is the correct thing for the motor. We are trying to add a motor after it goes forward, then 90 degrees counterclockwise, and the forward again. At that point we want to add a motor, please help.
int main()
{
printf("Drive Straight\n"); // announce the program
sleep(1.0); // wait 1 second
while (create_connect()); // Open the connection between CBC and Create
// As long as the create has not driven 1m
while (get_create_distance(0.1) < 90)
{
create_drive_direct(500,500); // Drive forward at 250mm/sec
}
mav(0,100);
sleep(1.0);
printf("Drive 60 degrees clockwise\n"); // announce the program
sleep(1.0); // wait 1 second
while (create_connect()); // Open the connection between CBC and Create
// While the Create's angle has not changed by 90 degrees clockwise
while (get_create_total_angle(0.1) > -260)
{
// Tell the Create to spin clockwise at a speed of 100mm/sec
create_drive_direct(-500, 500);
}
{
create_drive_direct(700,700); // Drive forward at 250mm/sec
}
printf("Drive 90 degrees counter clockwise\n"); // announce the program
sleep(1.0); // wait 1 second
create_stop(); // Stop the Create
create_disconnect(); // Disconnect the Create
printf("All Done\n"); // Tell user program has finished
}
The problem with the first code sample is that you have an extraneous semicolon after int main(). Removing that semicolon and just having curly brackets like you already have should fix your problem.
Correct:
int main()
{
...
}
Braden McDorman
Developer of the KIPR Link, KISS IDE, KIPR's 2D Simulator, and CBCJVM.
Reach me at bmcdorman(cat)kipr(dog)org where (cat)=@ and (dog)=. if you need assistance of any kind.
Good to see the details regarding the programming help services details you have shared Peter Veres here. There are so many such services capable of doing your work at the right time. You must be more concentrated on doing assignments on programing subjects and I am looking here for more updates on that.
Hi, welcome to the Botball Community!
Sounds like you're missing a parenthesis. Can you post about 5-6 lines of the code surrounding the line where the error shows up? It's hard to diagnose without looking at the code.
-Jeremy Rand
Senior Programmer, Team SNARC (2012-2013), Norman Advanced (2010-2011), Norman HS (2008-2009), Norman North (2005-2007), Whittier MS (2003-2004)
2012-2013 VP of Tech, 2011 President, Botball YAC (2009-2013)
Mentor, Alcott and Whittier MS
Thank You for getting back to me! here are five lines of our program.
int main();
{
int printf("Drive Straight\n"); // announce the program
sleep(1.0); // wait 1 second
while (create_connect()); // Open the connection between CBC and Create
// As long as the create has not driven 1m
while (get_create_distance(0.5) < 200)
{
create_drive_direct(500,500); // Drive forward at 250mm/sec
}
Also we are trying to add the motors into our program but we are unsure how to get it, here is our program so far, included what we THINK is the correct thing for the motor. We are trying to add a motor after it goes forward, then 90 degrees counterclockwise, and the forward again. At that point we want to add a motor, please help.
int main()
{
printf("Drive Straight\n"); // announce the program
sleep(1.0); // wait 1 second
while (create_connect()); // Open the connection between CBC and Create
// As long as the create has not driven 1m
while (get_create_distance(0.1) < 90)
{
create_drive_direct(500,500); // Drive forward at 250mm/sec
}
mav(0,100);
sleep(1.0);
printf("Drive 60 degrees clockwise\n"); // announce the program
sleep(1.0); // wait 1 second
while (create_connect()); // Open the connection between CBC and Create
// While the Create's angle has not changed by 90 degrees clockwise
while (get_create_total_angle(0.1) > -260)
{
// Tell the Create to spin clockwise at a speed of 100mm/sec
create_drive_direct(-500, 500);
}
{
create_drive_direct(700,700); // Drive forward at 250mm/sec
}
printf("Drive 90 degrees counter clockwise\n"); // announce the program
sleep(1.0); // wait 1 second
create_stop(); // Stop the Create
create_disconnect(); // Disconnect the Create
printf("All Done\n"); // Tell user program has finished
}
The problem with the first code sample is that you have an extraneous semicolon after int main(). Removing that semicolon and just having curly brackets like you already have should fix your problem.
Correct:
Braden McDorman
Developer of the KIPR Link, KISS IDE, KIPR's 2D Simulator, and CBCJVM.
Reach me at bmcdorman(cat)kipr(dog)org where (cat)=@ and (dog)=. if you need assistance of any kind.
Good to see the details regarding the programming help services details you have shared Peter Veres here. There are so many such services capable of doing your work at the right time. You must be more concentrated on doing assignments on programing subjects and I am looking here for more updates on that.