Hello, all,
I'm building a robot with both Raspberry Pi and an Arduino UNO R3- the Pi for the AI and the Arduino for motion/motion control. I recently bought a joystick for motion control, and that hasn't worked out too well.
Specifics:
I've got 4 microservos that I hacked to make continuous. They are arranged on the base as you would expect; two on each side. There is nothing to change the position of the servos themselves (meaning the body of the servo is stationary). What I have been trying to do with the joystick is make it so that when it's pushed forward all servos turn forward, pushed back all servos turn backward, and pushed to the side two wheels on the same side move forward the other two move backward (depending on the direction of course. What I've tried are if/else statements with the values of each of the axes, and since I'm here, that obviously didn't work out too well. The joystick is one of the black PS2 joysticks you can see whenever you go to buy one with pins for ground, 5v, X, Y and the button (I'm not concerned about the button.
Thank you for any help!