The servomotors are connected to an Arduino Pro Mini which one is connected to a computer (same for the cameras), to supply all the electronics an old pc power supply is used to provide 5 [V] and 10 [A] (approximately). To transfer information between the Arduino and the Processing program the firmata protocol is implemented (I just upload the one in the Arduino IDE examples).
A scheme of the electronic's connection is presented in the next image:

In the processing program, first the necessary libraries for the communication, some variables for storage the angles for the servos are declared as well:

Then the window control size is set, the Arduino to control selected, and the pins configured:

Because of the mouse position on the window configured above control the movements, only one thing can be control at the same time, so, to select what is controlled just one click is necessary:

The functions that transform the mouse position into angles are, for the neck:


For the eyes:

For the eyebrows:

For the mouth (jaw):

Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.