Creepy eyes Halloween prop upgrade

Posted by Grant on 22 October 2018

There are only a couple days left in our Halloween sale! Visit the sale page for more information, and if you are in need of some inspiration, check out our Halloween-tagged blog posts for some sample projects, including this upgrade to my creepy eyes prop:

I finally got around to upgrading my creepy eyes Halloween prop. As shown above, I mounted the mask on a picture frame to make it more presentable. I also added some of our VL53L0X time-of-flight distance sensor carriers so that the eyes could follow people in front of the mask. I camouflaged the sensors behind the black layer of foam behind the mask. Below is an image showing how the sensors were hidden in the lower corners of the picture frame:

I also swapped the Maestro out for an A-Star 32U4 micro, so I could communicate with the sensors through I²C. Due to switching to the A-star micro, I added one of our small solderless breadboards to help distribute power and a servo Y splitter cable since both sub-micro servos can use the same signal. I also added a power switch and used some of our premium jumper wires to make connections. You can see all the electronics taped to the back of the picture frame in the picture below.

3 comments

Love you creepy eyes, new to all of this and lots to learn, would you share the program for your creepy eyes in a line by line format so newbies can follow along. Thanks
Hello, John.

Unfortunately, I no longer have the original code I used for the eyes. However, I can give you a basic outline of what I did. You want to make a loop that reads the sensors and directs the servos to move accordingly. To read the time of flight sensors, use our VL53L0X library for Arduino. The readings should be combined in a way to give the location of an object in front of the sensors. I took each sensor reading and converted them so that the value is bigger the closer the reading is to the sensor. Then I made one negative and added the two values together. That way a value of zero is center, positive denotes one direction and negative another direction. Then I used that location and translated it into a servo position. Then use the commands from the Arduino Servo library to set the position of the servos accordingly.
Thanks

Post a comment

Using your Pololu account allows you to customize your avatar and manage your comments; you can also post anonymously.

Related Products

A-Star 32U4 Micro
Sub-Micro Servo 3.7g
170-Point Breadboard (Red)
Servo Y Splitter Cable 12" Female - 2x Male

Related Categories

Female-Female Premium Jumper Wires
6.0 V NiMH Battery Packs
Log In
Pololu Robotics & Electronics
Shopping cart
(702) 262-6648
Same-day shipping, worldwide
Menu
Shop Blog Forum Support
My account Comments or questions? About Pololu Contact Ordering information Distributors