Hi all, I am currently in the middle of a project and am looking for some advise. My group built a rope climbing robot and now we need to program it. I was hoping for some tips and ideas because I'm not that good with programing. Please don't think I want it done by anyone just want some help. So the robot must climb a rope up and down 8ft high but must stop and hold for 3 sec. between 3-4 ft. Lastly on its way down it my stop a ft off the ground. So we in stalled limit switches on both ends and have the bottom switch attached to a pivoting arm. So our idea(programing section) is to say climb x amount of ft and put a timer that holds it for those specified sec. then resume the climbing function up to the top where it will trigger the limit switch and the signal from the switch will tell the bot to climb down where it will lower itself down onto the last switch stoping the program. So dumb question 1: is it possible to reverse the polarity of the motor through the program to switch from up climbing to down?. Thank you and any help is appreciated very much.

Last edited by egrnewbie on Thu Oct 10, 2013 2:03 pm, edited 1 time in total.

Thu Oct 10, 2013 1:04 pm

egrnewbie

Rookie

Joined: Thu Oct 10, 2013 12:41 pmPosts: 5

Re: programing help for rope climbing robot

Forgot to mention I'm trying to do this with natural language robotc

Thu Oct 10, 2013 1:07 pm

Ernest3.14

Professor

Joined: Sat May 18, 2013 1:24 pmPosts: 272Location: Olympia, WA

Re: programing help for rope climbing robot

Yes, you can. If you set the motor power to a negative value, the motor turns backwards. This is done through a clever little circuit called an H-bridge: http://en.wikipedia.org/wiki/H_bridge

That's really cool thanks for the link but I forgot to mention we were given a kit and are only allowed to use what is provided to us by the kit.

Fri Oct 11, 2013 1:46 pm

egrnewbie

Rookie

Joined: Thu Oct 10, 2013 12:41 pmPosts: 5

Re: programing help for rope climbing robot

Also I was on robotc lastnight and seen there was a section to specify what motors were in use and what port they were in. After that it looked like if it wanted me to define them almost as declaring a statement. Can you touch on that a little or is that something I can find in the help section in the program database. Thanks and sorry I suck at programming.....one last thing it's a vex cortex microcontroller.

Fri Oct 11, 2013 1:53 pm

Ernest3.14

Professor

Joined: Sat May 18, 2013 1:24 pmPosts: 272Location: Olympia, WA

Re: programing help for rope climbing robot

Ah. I'm an FTC programmer, can't help you there Although if VEX works similarly, those #pragma statements are for the compiler, and aren't a standard feature of C. You'll have to let RobotC set it up for you. It's called "motors & sensors setup" or something. Does double-clicking on the declarations open something?The H-bridge should be built into your motor controller Try `motor[motor_name] = -100;` - that might work.

Who is online

Users browsing this forum: No registered users and 1 guest

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