Driving Mecanum with a Cheap Radio

Hi, I want to drive our robot with this transmitter and this receiver.

I haven’t tried my code on any ESC and do you think this code will work on VictorSPX ESCs?

In addition, I only tested code to get the value from the receiver and printing the value after mapping to 0 and 180.

Note: You can find servo library docs here

1 Like

All FRC motor controllers are compatible with the standard RC motor controller PWM standard, so I don’t see why it wouldn’t work. I would try it out on blocks first though, just to be safe.

thank you very much that means a lot :slightly_smiling_face:

Some FRC motor controllers are CAN only – these use a safety protocol that makes it non-trivial to use these outside the normal FRC environment. (Some of these do also have non-FRC-legal firmware versions that provide an easy way around this.) PWM is simpler and doesn’t have an equivalent (short of cutting off the PWM signal). The safety stuff is there for a reason, so be careful. In your code, I see there is some kind of safety shutdown.

Mecanum requires mapping from the control inputs to the motor commands. I also see you have code meant to handle this. It looks as though either the radio or the receiver will run this code? If so, you should be good – but I didn’t look carefully at the code. The main thing is the logic/math – there is code here on CD you can use as a reference, should that prove helpful.

2 Likes

While what @bobbysq said is correct in that all current FRC-legal motor controllers are compatible with RC-timing style servo control (like the Victor SPXes), @nuttle is correct in that you’ll need some mechanism to remap the traditional outputs of the controller to mecanum style driving, whether through firmware in the reciever / transmitter pair or with a “quick and dirty” mixer from AndyMark.

3 Likes

Thank you for your reply, arduino will run this code; arduino will power the receiver with 5V, only receivers’ signal pins will be plugged seperately to arduino’s digital pins, and victorSPXs’ signal pins will be plugged to other digital pins.

For emergency, I assigned a switch on the transmitter to stop all the motors.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.