Class CrawlerSteering - GSTCH/SketchMadeEASY GitHub Wiki
Topic | Specification |
---|---|
Description |
Sketch Made EASY combines inputs with actuators through logic. This class contains the logic to steering a tracked vehicle. This requires two joystick axis (as input) and two motors (left and right side as output). With a condition it's possible to enable or disable the logic.![]() Movement of the motors depending on the joystick position. The red area is the normal drive, the green is the pivot turn. The area width of the pivot turn is a parameter of the constructor. This also defines a 0-area. |
Constructor |
CrawlerSteering(Condition* Condition, Actuator* ActuatorLeft, Actuator* ActuatorRight, Input* AxisX, Input* AxisY, int PivotWidth) Parameter Condition: Condition when the relation is activeActuatorLeft: Left motorActuatorRight: Right motorAxisX: Joystick X-AxisAxisY: Joystick Y-AxisPivotWidth: PivotRange/2 |
Samples | JoystickAxis* xAxis = new JoystickAxis(A0, false); JoystickAxis* yAxis = new JoystickAxis(A1, false ); MotorI2C* motorLeft = new MotorI2C(1); MotorI2C* motorRight = new MotorI2C(2); CrawlerSteering* crawlerSteering = new CrawlerSteering(NULL, motorLeft, motorRight, xAxis, yAxis, 20); |
Examples | Look test "80-CrawlerSteering" |