Digit port power address

I was wondering if you can address power to the digital ports to power LEDs if so what is the command ?

I assume you mean whether you can power on and off LED’s, in which case it is as simple as:


SensorValue[dgtPort] = 0;

to turn them on and:


SensorValue[dgtPort] = 1;

to turn them off.

LED’s can be really helpful for telling the drive team info about your codes position and what is happening inside your code. For instance, I’ve seen a few teams using it to tell when your flywheel is back at speed. They also make very fancy lights for some sweet looking robots :D.

The signal wire is not able to sustain much current at all, however. So via the code you will only be able to power a single VEX led, and it will not be very bright.

If you are hoping to use code to power a strip of LEDs on and off, that will not work without extra circuitry (transistors), which is not legal for competition use.