jt_enliten
Published © GPL3+

Pumpkin with Single Rolling Eyeball, mobile and low budget

A micro project aiming to create a pumpkin with a single rolling eyeball that is mobile and under low budget

BeginnerFull instructions provided346
Pumpkin with Single Rolling Eyeball, mobile and low budget

Things used in this project

Hardware components

Arduino Nano R3
Arduino Nano R3
×1
Jumper wires (generic)
Jumper wires (generic)
As many as your build needs.
×8
18650 battery cell
Need 2 for the 7.4 - 8V voltage to power up the servo and Nano. I used two 1200mAhcells bought from Banggood and they may last 3 - 4 hrs.
×2
SG90 Micro-servo motor
SG90 Micro-servo motor
×1
Pingpong Ball
Cut one ball into half to make the spooky eye.
×1
cardboard
Cut the cardboard to make the battery holder.
×1

Hand tools and fabrication machines

Hot glue gun (generic)
Hot glue gun (generic)
Use glue to attach eyeball to servo shaft and servo body to battery holder.
Scissor, Electrician
Scissor, Electrician
Tape, Electrical
Tape, Electrical

Story

Read more

Custom parts and enclosures

CAD1

CAD2

Schematics

Pumpkin_Schematics

Code

Pumpkin_rotating_eyeball

C/C++
The code used to control the servo that rotates the pumpkin eyeball.
#include<Servo.h>

Servo ser;


void setup()
{
  ser.attach(5); //Attach Vertical Servo to Pin 5
  Serial.begin(9600);

}


void loop()
{

    int pos = int(random(0,41));
    Serial.println(pos);
    ser.write(pos);
    delay(int(random(500,2000)));

}

Credits

jt_enliten

jt_enliten

0 projects • 0 followers

Comments