SensorDigitalOut

I have RobotC 2.32 and am trying to use the SensorDigitalOut to turn on an LED.

sensorDigitalOut[digital port] = 0;
with the digital port assigned to a digital out in the progma statement.

THere is an error saying that you cannot assign it to a constant.

Anyway,
THanks for your help

Sorry for the slow reply. The post wasn’t flagged as new for some reason…

Here’s how to use the LED in ROBOTC:

#pragma config(Sensor, dgtl1,  LED,                 sensorDigitalOut)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

task main()
{
  //Turn LED ON
  SensorValue[LED] = 0;
  wait1Msec(3000);
  
  //Turn LED OFF
  SensorValue[LED] = 1;
  wait1Msec(3000);
}