RobotC equivalent of setDigitalOutput

Hi,

Our programmer is porting our code from last year, which was written in EasyC to RobotC for our new Gateway robot. Overall the process has gone well. He has run into one snag and I’m hoping that someone can help us out.

In EasyC, there is a call, “setDigitalOutput” which takes a digital port number. It allows you to send a zero or a one to a specific digital output port (sensor port).

Can anyone here tell me if there is a call in RobotC that would be equivalent to the EasyC setDigitalOutput? So far, our programmer has not been able to find anything like this.

Thanks in advance,

Irv

Team 3129, the Green MacHHHHine

This is very simple to do in ROBOTC. In the Robot > Motors and Sensors Setup, configure one of the Digital Ports as a “Digital Out” and give it a custom name, such as “output”.

Then in your code, you can say “SensorValue[output] = 0;” or “SensorValue[output] = 1;”

Thanks very much. We’ll give it a try.

Irv