motors
This commit is contained in:
@@ -7,9 +7,9 @@ Servo auxServo;
|
||||
|
||||
std::vector<MOTOR_PINS> motorPins =
|
||||
{
|
||||
{32, 33}, //RIGHT_MOTOR Pins (IN1, IN2)
|
||||
{26, 25}, //LEFT_MOTOR Pins
|
||||
{19, 22}, //ARM_MOTOR pins
|
||||
{RMOTOR_IN1, RMOTOR_IN2}, //RIGHT_MOTOR Pins (IN1, IN2)
|
||||
{LMOTOR_IN1, LMOTOR_IN2}, //LEFT_MOTOR Pins
|
||||
{ARM_IN1, ARM_IN2}, //ARM_MOTOR pins
|
||||
};
|
||||
|
||||
void setUpPinModes()
|
||||
@@ -23,8 +23,8 @@ void setUpPinModes()
|
||||
moveCar(STOP, false);
|
||||
bucketServo.attach(bucketServoPin);
|
||||
auxServo.attach(auxServoPin);
|
||||
auxControl(150);
|
||||
bucketTilt(140);
|
||||
auxControl(default_auxControl);
|
||||
bucketTilt(default_bucketTilt);
|
||||
}
|
||||
|
||||
void rotateMotor(int motorNumber, int motorDirection)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include <ESP32Servo.h> //by Kevin Harrington
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#define RIGHT_MOTOR 1
|
||||
#define LEFT_MOTOR 0
|
||||
@@ -13,10 +13,6 @@
|
||||
#define FORWARD 1
|
||||
#define BACKWARD -1
|
||||
|
||||
#define bucketServoPin 23
|
||||
|
||||
#define auxServoPin 17
|
||||
|
||||
#define UP 1
|
||||
#define DOWN 2
|
||||
#define LEFT 3
|
||||
@@ -36,7 +32,6 @@ struct MOTOR_PINS
|
||||
void setUpPinModes();
|
||||
void moveCar(int inputValue, bool horizontal);
|
||||
|
||||
|
||||
//motor functions
|
||||
void rotateMotor(int motorNumber, int motorDirection);
|
||||
void setMomentum(bool val);
|
||||
|
||||
Reference in New Issue
Block a user