I decided to start with Asimov's three laws of robotics. So I opened up WavePad, a sound editing program. In it you can type words and get text to speech. Once I had the voice I liked, I created the sound files for them. I've attached one of the sound files. I have found that the VS1053 module doesn't like long file names. It doesn't seem to be able to recognize them if they get too long.
I have attached a servo tester program. It allows you to connect a potentiometer to analog pin 0. By turning the pot and watching the servo and the serial monitor, you can set the distances that you want the servo to travel. That way you don't have it move too much and strip the gears, or too little and have a wimpy effect.
I have also attached my current iteration of the whole program. It's pretty well commented. If you have been looking at the Adafruit and Sparkfun tutorials that go along with the components, it should make sense. I really think I can clean up the code and optimize the performance. But it's where I am now.
It uses a FLASH array to give commands that move the eyes and change the eye color. A timer opens the array every 2 seconds of the sound file and moves the servos and changes colors accordingly:
//=====================ARRAY==================================================
/* 1=EYES LEFT/RIGHT(4000-900) 2=EYES UP/DOWN (3400-500) 3=EYELIDS OPEN/CLOSE (3400-800) 4=EYELIDS TILT (4900-3800) 5=RED 6=GREEN 7=BLUE*/ FLASH_ARRAY(int, table, 2500,2000,800,3800,0,255,0,
The first number is the servo value that centers the eyes left/right. The second centers them up/down. The third opens up the eyelids, and the fourth centers the eyelid tilt. The last three values are for the NeoPixels. So it sets them to very green to start.
I am thinking of disconnecting the eyelid tilt servo and putting two servos in the forehead to move eyebrows. Looking at a lot of animatronic puppets, the eyebrows change the expression a lot. If you added in eye color, it could be really effective.
************************************
I hope that I have given you enough information and details that you
could construct your own animated face. It would be really fun to make a latex mask face of a creature for Halloween.