Sunday, March 11, 2012

Joystick robot motor

Joystick robot motor Video Clips. Duration : 2.93 Mins.


This is a small project I have been working on to control a vex motor and eventually a full blown robot from the computer via a joystick. It uses a basic Saitek joystick hooked up to a custom C# program which gets the axis and button values from it via directx directinput. The values are then scaled to 0 to 180 and sent out over serial to the arduino in much the same manner that my serial controlled stepper motor worked. When the arduino receives the instructions it then extracts the value and sets the motor to the value (speed). It can also work for a servo motor by simply changing the cable. This system will soon be deployed a robot similar to by bluetooth tank but it will have a live video feed on the computer screen and it will be controlled via a joystick instead of keys!!! Here is the source code, download the arduino joystick code for the code that was on the arduino, and the working joystick test for the C# code. code.google.com You should check out this tutorial which got me started, I give full credit to the author for the sample code I used. www.codeproject.com Keep in mind you have to download the directx SDK which is about 600mb the link is in the tutorial above.

Keywords: vex, robot, robots, joystick, insane, crazy, axis, math, computer, C#, C++, programming, JAVA, arduino, atmega, 168, atemega168, science, hobby, machine, engineering, motors, dc, pwm, controlled, serial, baud, rate, bps, directinput, directx, visual, studio, tank, control, future, uav, helicopter, airplane, gear, 2560, project, joysticks, physics, electronics, wireless, mechanics, experiment, technology, racing, diy

No comments:

Post a Comment