Thursday, January 17, 2008

Final Year Studio - Development - 4 Key Servo Motor Angle Control



Above is the development of the code used in the Roboduck activity. The single servo is controlled by the user pressing either the right, left, up or down arrows on the keyboard. The Processing code checks for which key is pressed then sends out a value to the Arduino board. The Arduino board assigns this value then to the servo angle variable and outputs the instruction to the specified pin, the servo arm then moves to this angle. This is done many times a second as the Arduino board checks whether Processing is sending a value, and a key is being pressed. The next step is to us the ASCHII keychart to allow the user to use the whole keyboard to send values to the servo motor as well as creating an array that allows values to be sent to multiple servo motors. I have tried this just using two servo motors but the control seems very intermitent and unreliable. Ideally once this code is completed I will be able to transfer this program to one that then reads what letters are on screen, again sending out specific values to the servo motor for each charactor.

No comments: