Devilish Doll That Follows Your Shadow As You Walk

by marcelrovirac in Circuits > Arduino

122 Views, 1 Favorites, 0 Comments

Devilish Doll That Follows Your Shadow As You Walk

WhatsApp Image 2022-11-03 at 14.40.37.jpeg
WhatsApp Image 2022-11-03 at 14.40.24.jpeg

the intention of the project is to scare anyone who enters the house with a doll that follows them with its eyes

Supplies

For the construction of this project the following materials are necessary:

arduino one x1

servo motor x1

photoresistors x4

resistent

a doll x1

White glue x1

wood x1

black cloth x1

halloween decorations (as many as you want)

Downloads

Open the Doll

WhatsApp Image 2022-11-03 at 11.29.36.jpeg

First we will have to open the doll and separate the head from the body.


Glue Wood

WhatsApp Image 2022-11-03 at 11.29.36 (2).jpeg
WhatsApp Image 2022-11-03 at 11.29.36 (1).jpeg

2n we will have to glue the servomotor to the wood where we want to place the doll's head, we will also glue the photoresistors along the wood pointing in the direction in which the head will look

third we will make the following connections so that all the analog inputs are connected to the arduino and the digital output goes to the servomotor


Arduino

Captura.JPG
start.png

then we will put the following code in the arduino, the luminosity values ​​can change depending on the location of the place, they will have to be adapted to each place so that it works well


 #include <Servo.h>


// C++ code

//

#include <Servo.h>


Servo servo_9;


void setup()

{

 Serial.begin(9600);

 servo_9.attach(9, 500, 2500);

  

}


void loop()

{

  

int lila = analogRead(A1);

int tronge = analogRead(A2);

int groc = analogRead(A3);

int verd = analogRead(A4);

int blau = analogRead(A5);

  

 if(lila>700){

 servo_9.write(40);

 delay(10); // Delay a little bit to improve simulation performance

   

 }else if(tronge>700){

 servo_9.write(90);

 delay(10);

   

   

 }else if(groc>700){

 servo_9.write(120);

 delay(10);

   

  

 }else if(verd<700){

 servo_9.write(180);

 delay(10);

   

  

/*}else if(blau>900){

 servo_9.write(180);

 delay(10);*/

   

  

 }

  

  

  

  

 Serial.print("a1=");

Serial.println(lila);

 Serial.print("a2=");

Serial.println(tronge);

 Serial.print("a3=");

Serial.println(groc);

 Serial.print("a4=");

Serial.println(verd);

 // Serial.print("a5=");

//Serial.println(blau);

}

Cloth and Decoration

WhatsApp Image 2022-11-03 at 11.29.36 (3).jpeg
WhatsApp Image 2022-11-03 at 11.29.36 (5).jpeg
WhatsApp Image 2022-11-03 at 11.29.36 (4).jpeg
WhatsApp Image 2022-11-03 at 11.29.36 (6).jpeg
WhatsApp Image 2022-11-03 at 11.29.36 (7).jpeg

once the code is well calibrated to the indicated place we can prepare the decorations, the first thing we will do is put the black cloth so that it covers the whole circuit and we will make holes in the place where the servo is and the photoresistor so that they can work

then we will glue the head to the servo without the servo being seen, we will hide the circuits with various decorations, IMPORTANT without covering the photoresistor, otherwise it will not work

we have to make sure once the set is placed in the right place that a minimum of light reaches it, then we do some tests to see if it follows us well and the head is well attached to the servo