Hi I'm in an emergency I have a deadline for this project. I'm new at Arduino I basically have 4 stepper motors and 1 servo motor giving the arm 5 joints, allowing it to move in any direction. To create a claw device for the robot arm we are using a servo motor allowing it to grab any object. The stepper motors are going to be connected through a CNC shield Expansion Board as well as A4988 Driver to allow a smooth connection between the stepper motors and the Arduino chip. The A4988 drivers are going to be connected to a Driver Module DRV8825 which allows a connection between the CNC shield Expansion Board and the A4988.
Can anyone help me with how to code or have a code that can help me in having the PS4 controlling the stepper motors? Another words, PS4 being able to control the robotic arm. PLEASE HELP
So basically its a controller that is used to play video games. But in this case I want to use it to control my robot arm I created. It has stick knobs and I need a code that connects with PS4. Like if the right analog stick knob of the controller moves right then the first step motor will move.
void event()
{
int yAxisValue =(Ps3.data.analog.stick.ly); //Left stick - y axis - forward/backward car movement
int xAxisValue =(Ps3.data.analog.stick.rx); //Right stick - x axis - left/right car movement
if (yAxisValue <= -50) //Move car Forward
{
}
else if (yAxisValue >= 50) //Move car Backward
{
}
else if (xAxisValue >= 50) //Move car Right
{
}
else if (xAxisValue <= -50) //Move car Left
{
}
else //Stop the car
{
}
}