SIP CAR Code BLUETOOTH
BLUETOOTH #define MAX_PACKETSIZE 32 //Serial receive buffer char buffUART[MAX_PACKETSIZE]; unsigned int buffUARTIndex = 0; unsigned long preUARTTick = 0; struct car_status{ int speed; int angle; int direct; }; int move_speed=100 ; #define MAX_SPEED 250 #define MIN_SPEED 50 #define TURN_SPEED 70 #define SLOW_TURN_SPEED 50 #define BACK_SPEED 60 int buttonState; char old_status='0'; #define speedPinR 9 // RIGHT WHEEL PWM pin D45 connect front MODEL-X ENA #define RightMotorDirPin1 22 //Front Right Motor direction pin 1 to Front MODEL-X IN1 (K1) #define RightMotorDirPin2 24 //Front Right Motor direction pin 2 to Front MODEL-X IN2 (K1) #define LeftMotorDirPin1 26 //Left front Motor direction pin 1 to Front MODEL-X IN3 ( K3) #define LeftMotorDirPin2 28 //Left front Motor direction pin 2 to Front MODEL-X IN4 ( K3) #define speedPinL 10 // Left WHEEL PWM pin D7 connect front MODEL-X ENB #define speedPinRB 11 // R