![]() But looking at my connection setup, is everything connected to the right pins etc? I'm really not very clued up with prototyping and therefore if you can help me to amend the code to work with my setup, I'll really be happy since I've been battling and struggling to get the project going. ![]() I'll then use timing belt to slide the camera left and right. Attached to the stepper motor's shaft will be a pulley and on the other side just a normal shaft enclosed in a bearing unit also containing a pulley. The purpose of this setup is to slide a camera left and right, faster and slower on a rail of plus minus 1.5m in length. So basically left and right movement via the joystick as well as speed adjusting as the joystick moves further from the center pin. When the joystick is pressed to the left or right, the motor must move in the respective direction and the further the joystick moves from the center, the faster the speed of the motor must be. Well, when the joystick is in the center and not moving, the motor shouldn't do anything and stop. How can I modify this code to work with my setup and control the motor via the joystick:Ĭonst int spr = 200 // motor steps per revolution Here is a link to the joystick as well:īelow is some sample code I downloaded from the net which rotates the shaft from one direction to the other with a delay. So far I've been looking for good tutorials on the net with regards to the subject but had no luck so far.Īttached to this article are two photos showing how I connected my joystick to the motor shield board as well as a closeup view of the specific joystick I bought. ![]() My aim is to use the thumb joystick to control the direction of the stepper motor on the X-axis, left to right as well as the speed. I recently purchased an Arduino Uno R3 board with a Arduino Motor Shield Rev3 as well as a joystick breakout board. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |