Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Materials:
- A volunteer (doll)
- Pieces of cardboard
- An empty soft drink
- Two servomotors
- A Arduino Uno
- A Joystic Shield
- Arms for the servants
- Three screws
- nuts and a washers
- Hot glue, scissors, knife, etc. ...
Step 2: Creating the Model
I used a can of soda as a model for the doll bull riding. After that, I drew on the cardboard, cut out the template and glued using hot glue.
Step 3: Joining the Servomotors
The servo motors are fixed on each other as shown, using a piece of cardboard to position them correctly and hot glue.
Step 4: Attaching the Mount
Joining small pieces of cardboard with a hole in the center, was made a bracket to hold the mount in servants.
Step 5: Joining the Servants and the Mount
I used a bolt, a nut and washer to secure the mount in servants, according to the figure.
Also used a piece to make the linking of movement between the servo arm and mount. This part should be a little slack for not hang with the movements.
Step 6: Fixing on a Base
The base was made with a simple cardboard cutout. I made the design of servo arm that controls the base, cut out and pasted it on cardboard with hot glue.
I used a part of the soda can as a handle to hold the puppets up on it.
Step 7: Assembling and Programming the Controller
#include <Servo.h> // incluindo a biblioteca dos servos
const int VRx = A0;
const int VRy = A1;
int sensorVRx = 0;
int sensorVRy = 0;
int outputVRx = 0;
int outputVRy = 0;
long tempo_anterior= 0;
long intervalo= 100; //milisegundos
unsigned long tempo_atual;
tempo_atual = millis();// o tempo atual é igual ao tempo de funcionamento do uC
sensorVRx = analogRead(VRx);
sensorVRy = analogRead(VRy);
outputVRx = map(sensorVRx, 0, 1023, 0, 180);
outputVRy = map(sensorVRy, 0, 1023, 0, 180);
if(tempo_atual - tempo_anterior > intervalo)// se o tempo atual menos o tempo anterior for maior que o intervalo com que eu quero fazer minha acao
tempo_anterior = tempo_atual;//tempo anterior recebe o tempo atual