View unanswered posts | View active topics It is currently Mon Nov 24, 2014 11:00 am






Reply to topic  [ 2 posts ] 
Beginner's help need code examples 
Author Message
Rookie

Joined: Wed Jun 26, 2013 10:11 pm
Posts: 1
Post Beginner's help need code examples
Hi everyone, my name is nick, I am a computer science major who just joined a team in a robotics club. We have just finished assembling our four wheeled vex claw bot and for our first challenge we have to make it so our robot can get across a bump safely without losing its balance. Now since I'm new to RobotC, have only programmed in C, and have never written a program in RobotC before, I was wondering if somebody could show me an example of a self balancing robot program, so if the robot starts to fall, the code sends a control algorithm that will send a signal to the motor, telling it which direction and how much to move in or order to keep it upright? Could anyone show me a script or program capable of doing that?


Wed Jun 26, 2013 10:43 pm
Profile
Site Admin
Site Admin

Joined: Thu May 24, 2012 12:15 pm
Posts: 609
Post Re: Beginner's help need code examples
For this particular challenge, your best bet may be a sensor such as the accelerometer or gyroscope mounted on the robot to detect vertical rotation. In order to program the robot, though, you will want to take a look through our VEX Cortex Video Trainer Curriculum. This will get you started with the programming in ROBOTC and should set you on the right path to creating a program that can help keep the robot upright.

Once you have a solid framework to build off of, let us know and we'll be more than happy to give pointers on how to make the program run smoother; however, we won't be able to give full programs for homework assignments or projects, so the majority of the programming will be up to you.

Let us know if you have any other questions, and we'll gladly answer them for you.

_________________
Check out our Blog! And our Facebook page!
Need help? Take a look at our Wiki and our Forums.

I just met you,
And this is crazy,
But here's my code now,
So fix it, maybe?
~ Carly Rae Jepsen parody


Thu Jun 27, 2013 2:48 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


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

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.