Questions tagged [robotc]

RobotC is a c-like language used for an introductory in programming robotics.

RobotC is a c-like language with some mix of c++ used for an introductory in programming robotics. It is used to program Vex Robots(IQ + Cortex), and Lego robots(NXT + EVE3).

Resources

Main website: http://www.robotc.net/

Documentation: https://www.robotc.net/WebHelpVEX/

Unofficial Forum: https://www.vexforum.com/

Note, the original forum has been taken down

29 questions
3
votes
0 answers

How to create a Line With Gaps Follower? [Robotc] [LegoMindstorm][EV3]

Trying to create an algorithm/code in order to get my robot to follow a track which it currently can do, using a color sensor and following the inside edge. So I'm wondering how to transition to the track with broken parts the track has gaps with a…
SSSS
  • 190
  • 1
  • 8
2
votes
0 answers

Robotc - Finding balls, grab and drop

I have to solve a problem with EV3, using language C with ROBOTC. I am trying to find a ball in the field, grab it and drop in the triangle area. I'm using a ultrasonic sensor in front of the robot. My solution for now is: Turn 360 degrees and find…
OnScreen
  • 47
  • 8
2
votes
1 answer

How does the motor function work in Robot C

My team is writing code for RobotC, a language with C-like syntax. It is mainly used as an introductory to programming in robotics. It has the base C stuff: if statements, for and while loops, functions and it even has structs, arrays and…
Blubber
  • 1,375
  • 1
  • 15
  • 32
1
vote
0 answers

VexIQ brain not responding to controller

I have been writing code for a vexIQ robot and my code is not working. A command that only turns on the motor works, but as soon as I add the controller it stops working. I am not getting any error messages on the computer or the brain, but the…
1
vote
1 answer

Robotc Line Follow Code Needs to be Faster

For full details read the Robocup Documentation. I am doing senior rescue, If you could help me, I would be very happy. Thanks. int diff; long redValue1; long greenValue1; long blueValue1; long redValue2; long greenValue2; long blueValue2; task…
1
vote
2 answers

Can lego EV3 brick be programmed to get user input?

Sorry I am totally new to Lego ev3 Mindstorms, I need to do this for a subject's project. I am going to program it using ROBOTC language, and to meet my project requirements I am thinking to allow user to enter input to the robot using the EV3…
wesley
  • 103
  • 2
  • 14
1
vote
2 answers

RobotC upload sound file to EV3

I am now working with the EV3 and would like to upload a sound file to the EV3 using RobotC. I already converted some .WAV files to .RSO files and pasted them to this folder: C:\Program Files (x86)\Robomatter Inc\ROBOTC Development Environment…
Nicola Uetz
  • 848
  • 1
  • 7
  • 25
0
votes
0 answers

Using RobotC with EV3 and motors with no encoders

Is there a way to control motors with no encoders using RobotC (version 4.56) and an EV3 brick? I cannot seem to just rotate the motors with any given speed. When setting up the motors I cannot untick the encoder boxes. Plus when I use the…
0
votes
1 answer

RobotC Mindstorms EV3 - How to get Brick Button Input?

Is anyone able to tell me how to get input from the brick buttons on the LEGO Mindstorms EV3 brick using the ROBOTC program ('ROBOTC for LEGO Mindstorms 4.X') that I can use in a script? The program gives me suggestions when I type in 'button', like…
Lucas
  • 1
  • 1
0
votes
1 answer

how to program vex claw robot to do line following?

I am trying to use lineTrackForTime command on claw robot but it seems like the robot just run over the line and can't detect it. However when I switch to square robot, the lineTrackForTime command worked. The following code works on the square bot…
cass
  • 37
  • 5
0
votes
1 answer

robotc for Mindstorms **Error**:Undefined variable 'sonarSensor'. 'short' assumed

This code should theoretically loop forever until the sonar sensor detects a value above 10 cm's but when I try to compile this program in gives me the message Error: Undefined variable 'sonarSensor'. 'short' assumed. I'm not sure why it does…
0
votes
1 answer

Can you help me with this simple RobotC exercise?

I mean 2. Second Length found here I think I found all mistakes but still, I can't seem to get the right answer. On line 8 it should be wait1Msec(3000); instead of wait1Msec(4000); Swing turn to the right should be written as 100 power for C and 0…
0
votes
0 answers

Creatting a variable that stores a light sensor reading one second and after the program initializes. (RobotC Natural Language)

The variable needs to store this information for the rest of the program, and remain static so I can create another int that gives the difference between the initial and current readings. Would I use timers for this? None of the RobotC documentation…
Eleni M
  • 3
  • 2
0
votes
0 answers

Need some help on RobotC coding

I'm working on a project and I really need some help to understand how lego-temp.h works. I want to make a while loop so that I can measure the temperature while the robot is moving. The loop will stop when I'll find a temperature higher than the…
RaizO-
  • 1
0
votes
0 answers

Is there a problem with my While loop of SensorValue[bump]==0

I’m trying to make a loop where a motor will run and lights will cycle indefinitely as long as the button is not pressed yet when the while(SensorValue[bump]==0) will only run once even if the button isn’t pressed. #pragma config(Sensor, dgtl2, …
1
2