this program is sopposed to make the arm open all the way up need help

3 replies [Last post]
ryanneedshelp
Title: NooBot
Joined: 04/11/2012
Posts:
BotPoints: 0
User offline. Last seen 11 years 6 weeks ago.

hello my name is ryan i need you to look at my program and send me a corrected one. you see this program is sopposed to make the arm open all the way but it does not do this.my botball tornament is this saturday and i have one more day before that to work on this.program below.

  1. int main()
  2. {
  3. set_servo_position(0,2000);
  4. enable_servos(); // turn on servo
  5. sleep(.1); // pause while it moves
  6. printf("run from the KISS IDE & check values\n");
  7. printf("advance using down arrow\n\nB to quit\n");
  8. // move servo 1 in steps of 100
  9. set_servo_position(1,
  10. get_servo_position(1)-1800);
  11. printf("servo at %d\n", get_servo_position(1));
  12. sleep(.2); // pause before next move
  13. //while(!down_button() && !b_button());
  14. return 0;
  15. }

Beta
Beta's picture
Title: The Magnificent
Joined: 02/24/2012
Posts:
BotPoints: 266
User offline. Last seen 9 years 15 weeks ago.

It would probably be better to ask for assistance instead of asking for someone to do your work.

What errors is the code producing? From a simple glance, it looks like this line is only half complete:

  1. set_servo_position(1,

Spamming my inbox and posting four different programs is not how to get help. Remember that we are here to assist, not to do.

Thanks.

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.

ryanneedshelp
Title: NooBot
Joined: 04/11/2012
Posts:
BotPoints: 0
User offline. Last seen 11 years 6 weeks ago.

i am so sorry but its just i called the kiss help line and they are no help the manual is no help with the demobot. and this is my first year and all this is so hard.

Beta
Beta's picture
Title: The Magnificent
Joined: 02/24/2012
Posts:
BotPoints: 266
User offline. Last seen 9 years 15 weeks ago.

Well the first step in diagnosing your problem is to know what errors your code is producing. Could you copy and paste those errors onto the forum? Once we have an idea of what is wrong, we can help you get your code working.

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.