|
Page 1 of 1
|
[ 3 posts ] |
|
I need of help with programing
Author |
Message |
Sabata101
Rookie
Joined: Tue May 14, 2013 5:36 pm Posts: 1
|
 I need of help with programing
Hello I'm currently very new to RobotC, and was hopping if some one could help me with the code for my project I'm working on. I'm just doing something very basic, my robot will just be moving in circles and when it hits an object it will stop and wait for 5 seconds then back up and turn left. Heres what I've coded so far.
#pragma config(Sensor, S2, bumper, sensorTouch) //*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//
task main() {
while(SensorValue(bumper) == 0) {
motor[motorA] = 100; motor[motorC] = 30;
}
motor[motorA] = -50; motor[motorC] = -50; wait1Msec(5000);
motor[motorA] = -50 motor[motorC] = 20 wait1Msec(2000); }
For what ever reason an error pops up at the Wait 5 seconds and anything that is Motor C after the backing up part. Any help will be appreciated.
|
Tue May 14, 2013 5:44 pm |
|
 |
NeXT-Generation
Senior Roboticist
Joined: Wed Sep 28, 2011 10:13 pm Posts: 630 Location: If I told you, I'd have to kill you.
|
 Re: I need of help with programing
Don't worry, it's a simple fix. You just forgot to put semicolons behind the last two motor control commands. Happens to everyone.
_________________A.K.A. inxt-generation Self-proclaimed genius, and future world dominator. My Brickshelf Folder"Don't they teach recreational mathematics anymore?" - The Tenth Doctor Bow down to Nikola Tesla, King of the Geek Gods.
|
Tue May 14, 2013 5:50 pm |
|
 |
roboRed
Expert
Joined: Fri Nov 02, 2012 12:07 am Posts: 163 Location: California, USA
|
 Re: I need of help with programing
Problem Solved! 
_________________ string Robored = "Awesome" ~~Neil Balch~~
|
Sun Jun 02, 2013 8:57 pm |
|
|
|
Page 1 of 1
|
[ 3 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 2 guests |
|
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
|
|