Joe Paul
Supporting Member
Hi Folks,
While I'm resolving my Vixen animatronic issues, I decided to try the "Jawduino" approach.
http://buttonbanger.com/?page_id=137
http://buttonbanger.com/downloads/jawduino/jawduino.pdf
In the last 3rd of the video, because Nat's singing is louder (I assume), the movements are better synced. There hasn't been any manipulation of the audio; its played straight off of YouTube.
Below is the code from https://gist.github.com/danesparza/5e5cc6419e2f14908db6f15b5576f6b4
I only added my servo values, and I will adjust them shortly
So what I intend to do is not use the singer's audio to trigger the servo but rather record my own sounds, tones, singing, whatever, in a track that's not patched through to the speakers. This is much faster than all the tedious sequencing.
How I modified the purchased moose head and made the mouth mechanism:
Take care, Joe.
While I'm resolving my Vixen animatronic issues, I decided to try the "Jawduino" approach.
http://buttonbanger.com/?page_id=137
http://buttonbanger.com/downloads/jawduino/jawduino.pdf
In the last 3rd of the video, because Nat's singing is louder (I assume), the movements are better synced. There hasn't been any manipulation of the audio; its played straight off of YouTube.
Below is the code from https://gist.github.com/danesparza/5e5cc6419e2f14908db6f15b5576f6b4
I only added my servo values, and I will adjust them shortly
Code:
#include <Servo.h> // Standard servo library
Servo myservo;
#define SERVO_PIN 3 // Set to the controller pin for the servo
int servo_pos = 85;
int val1; // Floating value 1
int val2; // Floating value 2
int val3; // Floating value 3
char smon[30]; // Serial monitor buffer
void setup() {
myservo.attach(SERVO_PIN);
Serial.begin(9600);
}
void loop() {
// Set our initial servo position:
servo_pos = 85;
// Read our (floating) LED values
val1 = analogRead(A1);
val2 = analogRead(A2);
val3 = analogRead(A3);
if(val1 < 341) servo_pos += 10; //these 3 lines need to be adjusted to 6, 15, 10, total of approx. 31
if(val2 < 341) servo_pos += 10;
if(val3 < 341) servo_pos += 10;
// Debugging: Use the arduino IDE serial monitor to see these values
//sprintf(smon, "A1:%4d A2:%4d A3:%4d Pos:%4d", val1, val2, val3, servo_pos);
//Serial.println(smon);
// Set the servo position:
val1 = map(val1, 0, 1023, 84, 125); //my moose values 84, mouth closed, 125, fully open
myservo.write(servo_pos);
// Tiny delay:
delay(15);
}
So what I intend to do is not use the singer's audio to trigger the servo but rather record my own sounds, tones, singing, whatever, in a track that's not patched through to the speakers. This is much faster than all the tedious sequencing.
How I modified the purchased moose head and made the mouth mechanism:
Take care, Joe.
Last edited: