I am doing a project that requires 3 vex motors running off the activitybot. Is there any way to code this in simple IDE that could have them all 3 running at the same time using PWM?
Is there any way to code this in simple IDE that could have them all 3 running at the same time using PWM?
The short answer is yes.
The long answer depends on specifics like the things erco mentioned.
Since you've asked about Simple IDE, I assume you want to use C?
I don't use C much on the Propeller myself (I like Spin) but I know enough about C on the Prop to know you can control three servos and three motors simultaneously.
It looks like those motor controllers are controlled just like a continuous rotation servo. You'll want to send a 50Hz signal to the controller with pulses ranging from 1ms to 2ms. 1.5ms will cause the motor to stop with pulses longer or shorter causing the motor to turn in one direction or the other.
Any examples showing how to control a servo should work with those motor controllers.
Per Duane, you're nearly there with an Activity Bot. Presumably you're already up to speed on driving the A-Bots Hi-speed CR servos/wheels for motion. Just hook up each 3-wire connector to the Propeller Activity board, which already has two extra servo-style headers. For your third motor controller you may have to use jumper wires/breadboard to connect. And you'll use the types of same code/commands to control your motors/controllers as your CR drive servos, just using different pins.
Comments
The short answer is yes.
The long answer depends on specifics like the things erco mentioned.
Since you've asked about Simple IDE, I assume you want to use C?
I don't use C much on the Propeller myself (I like Spin) but I know enough about C on the Prop to know you can control three servos and three motors simultaneously.
What sort of h-bridge (motor controller) are you using? Are you using this one?
Sorry about the big pictures. These are from the Vex website.
You need some sort of h-bridge to power the motors.
You'll want to power the motors directly from the battery power. Don't power the motor from USB power or you'll likely destroy your USB port.
It looks like those motor controllers are controlled just like a continuous rotation servo. You'll want to send a 50Hz signal to the controller with pulses ranging from 1ms to 2ms. 1.5ms will cause the motor to stop with pulses longer or shorter causing the motor to turn in one direction or the other.
Any examples showing how to control a servo should work with those motor controllers.
Per Duane, you're nearly there with an Activity Bot. Presumably you're already up to speed on driving the A-Bots Hi-speed CR servos/wheels for motion. Just hook up each 3-wire connector to the Propeller Activity board, which already has two extra servo-style headers. For your third motor controller you may have to use jumper wires/breadboard to connect. And you'll use the types of same code/commands to control your motors/controllers as your CR drive servos, just using different pins.