Skip to content

Instantly share code, notes, and snippets.

@scottbez1
scottbez1 / PumpkinEye.ino
Last active September 19, 2023 11:44
Example code to animate the eye movements of a pumpkin Halloween decoration. See https://youtu.be/tyLo3LW5UCo for the full build video! Consider sponsoring me on github to support projects like this: https://github.com/sponsors/scottbez1
#include <Servo.h>
Servo s;
int pos[] = { 90, 80, 65, 120, 105, 110, 98, 68, 84, 74};
int d[] = {3000, 500, 1200, 1530, 700, 200, 800, 450, 300, 670};
void setup() {
s.attach(6); // <---- Change 6 to the pin you're using
}