tommyho
Published © Apache-2.0

Arduino Spooky Eye Pumpkin

Quickly adding a spooky eye to your project with an esp32 TFT module and an acrylic half sphere lens.

BeginnerWork in progress1 hour2,293
Arduino Spooky Eye Pumpkin

Things used in this project

Hardware components

M5StickC ESP32-PICO Mini IoT Development Board
M5Stack M5StickC ESP32-PICO Mini IoT Development Board
×1

Software apps and online services

MicroPython
MicroPython

Story

Read more

Schematics

Eye Photos

eye2 photo set

eye2-50.jpg

The main photo in the photo set

Sample Video

Code

M5-spooky-eye.py

MicroPython
Insert the code via the ui of the flow.m5stack.com
#--- M5-spooky-eye.py                ---#
#--- Written by tommyho510@gmail.com ---#
#--- for M5Stick-C (160 x 80 pixels) ---#
#--- Version 1.0 (October 2019)      ---#

from m5stack import *
from m5ui import *
from uiflow import *

lcd.setRotation(1)
setScreenColor(0x000000)
image0 = M5Img(0, 0, "res/eye2-50.jpg", True)

eyefs = None
eyers = None
j = None

eyefs= [50, 20, 10, 30, 60, 61, 62, 63, 64, 65, 80, 90, 70, 50, 20, 10, 30, 60, 80, 90, 70]
eyers= [1000, 100, 1000, 100, 1000, 20, 100, 20, 20, 20, 100, 1000, 100, 1000, 100, 1000, 100, 100, 100, 1000, 100]
while True:
  for j in range(21):
    image0.changeImg("res/eye2-"+str(eyefs[j])+".jpg")
    wait_ms(eyers[j])
  wait_ms(2)

Credits

tommyho

tommyho

8 projects • 16 followers
Manufacturing Engineer for Robotics products

Comments