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