Not eXactly C, or NXC, is a high-level programming language for the Lego Mindstorms NXT.

learn more… | top users | synonyms

1
vote
1answer
41 views

Absolute Turning Motor in NXC

How can I turn my motor to 123 degrees, not for 123 degrees? I tried the PosRegSetAngle("output", "angle") command and didn't work. Documentation for PosRegSetAngle
0
votes
1answer
123 views

Raw RGB data to Color?

I'm trying to convert the raw RGB values from a Colour Sensor into HSL but it doesn't seem to be working: R = rgbn[INPUT_RED]; G = rgbn[INPUT_GREEN]; B = rgbn[INPUT_BLUE]; var_R = ( R/255 ); var_G = ...
0
votes
3answers
249 views

Programming NXT color sensor with NXC?

Currently I am working Lego robot that solves 2x2x2 Rubik's cube. I am programming Lego Mindstorms NXT 2.0 color sensor in BricxCC. I already have RGB data with the command ReadSensorColorRaw. I ...
1
vote
1answer
111 views

Connection between two NXT bricks

Is it possible send information from BrickNXT_A to BrickNXTB_B? For example I have a touch sensor connected to IN_1 of Brick_A and I want send the result of the sensor status (1 or 0) to Brick_B. If ...
2
votes
2answers
156 views

How to turn the NXT at an angle with NXC

How can I program, with NXC, a Lego NXT to turn a specific angle? I've tried using wait() but the problem isn't solved. Can I use RotateMotor()? What parameters should I use? For example if I want ...
0
votes
1answer
432 views

Programming EV3 with NXC

I'm trying to run NXC programs (all run well on NXT) but when trying run it on EV3 I find an error. The download from computer to EV3, runs well but trying to run the program with RUN EV3, I have an ...
1
vote
1answer
297 views

Does NXC work with EV3? [duplicate]

Is it possible to create and run NXC programs on the EV3 brick? I installed BrixcCC, created a simple Hello World NXC program and selected "Download and Run" in the Compile menu. The EV3 brick made ...
3
votes
1answer
451 views

How to use two NXT bricks for 3+ motors and 4+ sensors?

I need to use multiple bricks in order to use more motors and sensors. I need to read sensor values, and tell motors to move. I've tried using bluetooth, however my attempts haven't been very ...
1
vote
1answer
746 views

RGB sensor HOWTO use?

I've got an RGB sensor (this one with the three LED thingies) and wonder how to access it using NXC. I know I can SetSensorColorFull(IN_1); and then access it using ReadSensorColorEx or, for ...
2
votes
1answer
351 views

How to locate objects, and move towards them, without pre-programming the path

So I need to find objects in an enclosed area, I have access to the standard set of NXT sensors, i.e. ultrasonic/light. However, the ultrasonic sensors seem to be very unreliable and erratic, in ...
4
votes
1answer
547 views

Is there a way to program the EV3 brick with NXC?

I tried to program the EV3 brick with NXC so i used BricxCC. The download of the program to the EV3 was successful but when i tried to start the program (which actually didn't show up on the program ...
5
votes
1answer
67 views

Accessing ARM Processor Memory Registers through NXC

Specific to the NXC (Not eXactly C) programming language. Is it possible to access the memory registers on the ARM AT91SAM7S256 processor? I'm trying to investigate the use of Timer Interrupts to ...
8
votes
1answer
270 views

NXC Saturation algorithm for limiting motors?

What is a good algorithm in NXC for control saturation? I want to make sure my motors don't turn past a certain angle, or they will break the model. I could do something like: if (angle > 45) ...
8
votes
0answers
227 views

PosRegEnable - How to change motor parameters?

I want to set PID parameters for a faster 'attack' when using PosRegEnablePID() on a motor. I am compiling with nbc/nxc 1.2.1 r4 mac osx fatbinary using -Z2 and -EF flags. But the compiler says: # ...