View Full Version : 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! ::)
psy_wombats
18-02-2008, 12:35
All teleop code should be in user_routines.c, in the function void Process_Data_From_Master_uP(void).
Jon Stratis
18-02-2008, 12:44
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! ::)
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.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.