Devices & Components
Arduino Nano
cardboard
Pingpong Ball
Jumper wires (generic)
18650 battery cell
SG90 Micro-servo motor
Hardware & Tools
Scissor, Electrician
Hot glue gun (generic)
Tape, Electrical
Project description
Code
Pumpkin_rotating_eyeball
c_cpp
The code used to control the servo that rotates the pumpkin eyeball.
1#include<Servo.h> 2 3Servo ser; 4 5 6void setup() 7{ 8 ser.attach(5); //Attach Vertical Servo to Pin 5 9 Serial.begin(9600); 10 11} 12 13 14void loop() 15{ 16 17 int pos = int(random(0,41)); 18 Serial.println(pos); 19 ser.write(pos); 20 delay(int(random(500,2000))); 21 22}
Downloadable files
Pumpkin_Schematics
Pumpkin_Schematics
Pumpkin_Schematics
Pumpkin_Schematics
Documentation
CAD1
CAD1

CAD2
CAD2

CAD2
CAD2

CAD1
CAD1

Comments
Only logged in users can leave comments