Where? Quick explanation please...

Okay, I am just wondering where I am to put the code for the tele-operable mode. Does it go in the user_routines file or where?

Also can anyone tell me the difference between these variables…

rc_dig_out
rc_dig_in
digital_io

Thanks to anyone who can give me any help! ::slight_smile:

All teleop code should be in user_routines.c, in the function void Process_Data_From_Master_uP(void).

the digital_io variables need to be set to either INTPUT or OUTPUT, depending on how you’re using them. for example, if you have a switch hooked up to one, it would be an INPUT. if you have an LED hooked up to one, then that would be an OUTPUT.

You then use the rc_dig_in or rc_dig_out to read/set your digital_io ports. only use the rc_dig_in for ports you set as an input, and rc_dig_out for ports you set as an output.