ROBOTC.net forums
http://robotc.net/forums/

programing help for rope climbing robot
http://robotc.net/forums/viewtopic.php?f=14&t=6935
Page 1 of 1

Author:  egrnewbie [ Thu Oct 10, 2013 1:04 pm ]
Post subject:  programing help for rope climbing robot

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.

Author:  egrnewbie [ Thu Oct 10, 2013 1:07 pm ]
Post subject:  Re: programing help for rope climbing robot

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

Author:  Ernest3.14 [ Thu Oct 10, 2013 9:46 pm ]
Post subject:  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

Author:  egrnewbie [ Fri Oct 11, 2013 1:46 pm ]
Post subject:  Re: programing help for rope climbing robot

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.

Author:  egrnewbie [ Fri Oct 11, 2013 1:53 pm ]
Post subject:  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.

Author:  Ernest3.14 [ Fri Oct 11, 2013 9:49 pm ]
Post subject:  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.

Author:  egrnewbie [ Sat Oct 12, 2013 9:57 pm ]
Post subject:  Re: programing help for rope climbing robot

Thank you very much and will do.

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/