I’m working on a project with Colorado State University to control the VEX robot using serial communications. I’m coding entirely in MPLAB with C18 and working from the default firmware. The serial communications part is going smoothly, but my problem is this.
In autonomous mode I can control the motors directly, but I receive no RC input whatsoever.
In non-autonomous mode I can receive RC input, but can only control the motors when the RC is turned on.
I’d like to get RC input and control the motors directly (as in pwm01 = 255; ), still having control of the robot if the RC is turned off.
My first thought was to switch between autonomous and non-autonomous depending on the rxdata.rc_receiver_status_byte, however, it doesn’t actually get sent in properly in autonomous mode (makes sense, otherwise someone could control thier robot in autonomous mode by turning the RC on and off.) So if there’s no input whatsoever to signify the RC turning on when in autonomous mode this switching won’t work.
I’m currently looking into using Generate_PWMs() and skipping the master processor, but the timing issues involved there worry me a little (I’d like a very stable platform), however, I may just be paranoid.
If anyone has any other ideas I’d appreciate any input. My current thoughts tell me it’s impossible to get any RC input in autonomous mode, but it would still seem reasonable that theres some way for the robot motors to run even when the RC is turned off in non-autonomous mode.
Thanks for any help you might be able to give.