/r/RobotC
ROBOTC is the premiere robotics programming language for educational robotics and competitions. ROBOTC is a C-Based Programming Language with an Easy-to-Use Development Environment.
ROBOTC is a robotics C-Based Programming Language for educational robotics. We work with VEX, VEX IQ, EV3, NXT, Robot Virtual Worlds, and Arduinos.
Other Useful SubReddits:
/r/RobotC
hey guys , im trying to install the software for my upcoming exam i have on the robotc lego for mindstorm . it does this error and when i press ok , the install is complete but working bad and alot of feature missing like virtual worlds packages not appearing , and an error appearing on screen when i download the code to the robot .
what do i do ?
thanks
tried installing in 3 different pcs and all of them are encountring this message .
I am new to ROBOTC but I have to make a vex robot project for school and our teacher is on leave and i couldn't find any answers on Google but how do I make a code for a line follower? If I have 3 line followers 1 on the right, left and center. I want to make a code so if there is a right or left turn the robot will turn UNTIL the center tracker sees the tape so that it is aligned but I don't know if that is possible.
RobotC used to make all of its old versions public on its download server, downloads.robotc.net. However, the server has been taken offline since around mid-2020, when the site went through a massive overhaul. Most of the versions have been archived through the WayBack Machine, but some, such as 4.27 have not. I was just wondering if anyone had been archiving old version files and has the installation files from the currently missing versions.
Hi,
we want to accses a file on the EV3 Brick using the File Accses system from RobotC. All functions require "nFileIdenticator". Type says it is a parameter of type 'long'. What is this? I coundn't find anything in the web help files.
Who has experience with creating log files in robotc? We have looked at the example files - but after that we did not find a file to download on the Brick (EV3).
Thanks for any help.
Kind regards Team Robo-Hunter
i cant get my until command to work i’m trying to make it so once a limit switch is pressed it will start the right motor can anyone help me out
I cannot figure out how to write code for this problem:
Touch the limit switch to start right motor at -95.25 for 5 seconds, then stop the motor
Nothing is working
Hello everyone!
So I am doing some projects via RobotC, and for optimization, I wanted to define functions that I have in the structure to be restricted outside the structure.
in normal C you would create a pointer in structure "struc" like so:
void (*some_function)(int a, int b);
then when having some function "FUNC" outside the structure, you would go and do the:
struc.some_function = FUNC;
and later you could do the following:
struc.some_function(a, b);
But I could not implement the same idea in RobotC. For some reason, I am getting loads of errors.
Can someone help me? It would be greatly appreciated!
Thanks in advance!
-VEX 2.0 Cortex -Natural Language PLTW
I'm doing a simple project where my groups bot has to follow a 1/2 black tape line on the floor. When running the programme, the lineFollower sensor values that are appearing max out at about 250-260 when to my knowledge they should be well into the 1000's. Adjusting the sensors' distance above the floor/line has not made any difference. After reading through the VEX forum a little bit seeing a poster who had the same issue, most of the replies narrowed down to the sensors being either too old or faulty. There are no code errors caught in the compiler but there may be something wrong with it that I'm not aware of. Is it more likely that the sensors themselves are the issue or is there something else that I need to do differently?
The software's general idea is extremely appealing, but its price combined with its limitations (mainly the limited choice of robot pre-sets and lack of sensors) really doesn't make me inclined to ever use it. Are there any known alternatives that would allow me to test/run code I've written in RobotC or otherwise without a physical bot? Any input would be helpful.
hello! i’m doing a project where i have three touchLEDs and a bumper switch. the touchLEDs have to go from green to yellow to red and back down and continue until i press the button. then it should immediately go red for 5 seconds then continue the pattern it was on but i’m rlly struggling and don’t understand what i’m doing wrong. i will post the code tmrw. currently the light stays in green and goes to red automatically but doesn’t go through the sequence. any advice would be much appreciated :) thank you
I was tasked with building a claw machine out of vex oarts (like the ones in arcades where you win prizes) but am having trouble programming the controls. I made a controller with 5 buttons for movement (up down left right and drop claw) but I cannot get the programming right.
I have tried using untilBump and untilRelease for them to start the motors but both of those require me to press the buttons in a specific order (order they are coded) and won’t run the program for a button later on in the code until the first one is pressed.
Any help on this would be appreciated, been trying to rack my brain around it for a while.
The tittle says it all, i would apeciate if somebody can help me, thank you very much
i was able to download and run it and get to the editor i have never used robot c before but i think it works
Anyone that is experienced in RobotC want to tutor me? :p
the title
Hey guys,
I've been trying to control one motor with the joystick channel 2 and the buttons 6U and 6D. (the same motor for both controls).
This is the code I have, but when I use it, my motor doesn't work.
<
\#pragma config(Motor, port2, LeftMotor, tmotorVex393\_MC29, openLoop, reversed)
\#pragma config(Motor, port3, RightMotor, tmotorVex393\_MC29, openLoop)
\#pragma config(Motor, port4, FrontMotor, tmotorVex393\_MC29, openLoop)
\#pragma config(Motor, port5, BackMotor, tmotorVex393\_MC29, openLoop)
\#pragma config(Motor, port7, RotateMotor, tmotorVex393\_MC29, openLoop)
\#pragma config(Motor, port8, LiftMotor, tmotorVex393\_MC29, openLoop)
//\*!!Code automatically generated by 'ROBOTC' configuration wizard !!\*//
task main()
{
while(true)
{
// la base
motor[LeftMotor] = vexRT[Ch3] - vexRT[Ch4];
motor[RightMotor] = vexRT[Ch3] - vexRT[Ch4];
motor[FrontMotor] = vexRT[Ch3] + vexRT[Ch4];
motor[BackMotor] = vexRT[Ch3] + vexRT[Ch4];
// le bras avec les chanels 1 et 2
motor[RotateMotor] = vexRT[Ch1];
motor[LiftMotor] = vexRT[Ch2];
//le bras indépendamment
if(vexRT[Btn6U] ==1)
{
motor[LiftMotor] = 127;
}
else if(vexRT[Btn6D] ==1)
{
motor[LiftMotor] = -127;
}
else
{
motor[LiftMotor] =0;
}
}
}
}
>
The LED has been blinking for more than 20 seconds, and when we connect as follows: PC-->Joystick-->Vex Programming Kit-->Cortex The Cortex doesn't show any LED for the Robot LED and Game LED, but the VEXnet blinks red twice. Can anyone help us? Otherwise appears to be working..?
Hello how can i use a NXT color sensor so when it sees the robot imediatly moves backwards thank u
Hello, I don't know if this should go in the r/robotc or r/vex forums but here I go...
So basically, what I want to do is make a "Start/Finish Line" program. What I need my vex to do is start when I press a button > turn on and off the 3 LED's> start the timer > turn on flashlights> wait until the lightsensor is blocked by an object (a.k.a the runner, a.k.a making it dark)> once the lightsensor passes that threshold> time is grabbed/ "recorded" by a given variable> once that happens the flashlights blinks until I stop the program (trying to make it like, OMOGMGOGMG YOU WON YAY YU'RE IN FIRST PLACE YAYAYYAYAYAY GOOD JOBBBBB!!!!!)
Now, my problem is that the flashlight, after the everything else before it goes, goes STRAIGHT to flashing, and the variable;e that's supposed to grab the time doesn't work. I tried if statements and until statements and played with the loop/while statements but it just doesn't work :<. Idk what to do anymore, I feel like the more I try to fix it and add more or remove, the worse it gets... Please, tell me what's wrong...
Thank you for your time :>
-Rye
Code of line:
task main()
{
int finishline; //variable for when *object* passes by the sensor
untilBump(bump); //triggers the start of the program (after i click start ofc)
turnLEDOn (red);
wait(1);
turnLEDOff (red);
turnLEDOn (yellow);
wait(1);
turnLEDOff (yellow);
turnLEDOn (green);
wait (1);
turnLEDOff (green);
turnFlashlightOn (flash1); //these should stay on forever until something passes the sensor
turnFlashlightOn (flash2);
clearTimer(T1); //timer starts
waitUntil(SensorValue (sensor1) >=110); //waiting until something passes by it-making it dark
finishline = time1\[T1\]; //grabs time
while(true){ //loop for the blinking lights
wait(1);
turnFlashlightOff (flash1);
turnFlashlightOff (flash2);
wait(1);
turnFlashlightOn (flash1);
turnFlashlightOn (flash2);
}
}// main //whY ISN'T IT WORKRINGINGIGION AHHHHHHHHHHHHHHHHHHHHH
I've been looking for a free version of RobotC for EV3 above 4.10 that doesn't require payment, because that's too expensive, and it's not like i'm gonna use actual VEX equipment. I DID find a free version, but it's 4.10, which is very buggy and outdated. (Example: Back button doesn't work properly when multitasking)
I need to make a variable that is records a sensor value at a specific time after initialization. Is it possible to use timers to do this? Would I make it a static in order to keep it constant?
I’m making an elevator and I would like to make a “double click” for a bump switch to signify to go down.