My friends and I are working on a project for school and we keep on getting errors. Our goal is to make a robotic arm which does three things; Can turn around 360degrees have the arm go up and down and to make pincers open and close. But the problem is we can not get the robot to do all the things in a single program. We are beginners, by the way ha. I attached the code if anyone could help it would be greatly appreciated . Thanks for your time.

"Mechanical.Arm.2A.Marc.Eli.Aaron.c" compiled on May 04 2012 11:20:21**Error**:Duplicate definition for name 'BaseMotor'.*Warning*:Unreferenced task 'BaseMotor'**Error**:Duplicate definition for name 'ArmMotor'.*Warning*:Unreferenced task 'ArmMotor'**Error**:Duplicate definition for name 'PincerMotor'.*Warning*:Unreferenced task 'PincerMotor'

You're using tasks in this program, which is used for multitasking. Read this and make sure you actually want to use multitasking. Otherwise, the error's you're getting are just a result of where you have your code. Move the 3 tasks you defined up before the main task, and you should be fine. I didn't go over it in detail though, so I don't know if you have any other problems in there.

_________________sudo rm -rf /

Fri May 04, 2012 12:38 pm

miki

Moderator

Joined: Thu Dec 22, 2011 7:42 amPosts: 43

Re: HELP PLEASE!!

Hi Marc,

3 quick tips:

Declare task main() at the end of code source, after the other task declarations.

Second, You used the name BaseMotor in the pragma declaration. For the task name, declare another name like TaskBaseMotor for instance.

take time to read each error, one by one and try to understand them quietly

Who is online

Users browsing this forum: No registered users and 2 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum