Giter Site home page Giter Site logo

urmel79 / io_esp8266_neopixel_pir_halloween_gh Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 1.0 23.38 MB

This project is an example application for ESP8266, a Styrofoam pumpkin illuminated by Neopixel LED ring and a mp3 sound output based on DFPlayer.

License: GNU General Public License v3.0

C++ 100.00%
esp8266 neopixel-ring dfplayer-mini-mp3

io_esp8266_neopixel_pir_halloween_gh's Introduction

Halloween spooky Pumpkin with ESP8266

This project is an example application for ESP8266, a Styrofoam pumpkin illuminated by Neopixel LED ring and a mp3 sound output based on DFPlayer.

An additional PIR motion sensor connected via an interrupt input recognizes movements in the environment and causes the LED light pattern to switch from a cozy fire imitation to a "spooky" blue-green as well as playing any scary sounds in mp3 format from microSD card.

The basic idea comes from the blog at AZ-Delivery: https://www.az-delivery.de/blogs/azdelivery-blog-fur-arduino-und-raspberry-pi/halloween-2019-der-kuerbis-erwacht-wieder.

Visual impressions

Here you can see the complete Halloween Pumpkin arrangement:

Halloween Pumpkin complete

This is an image of the breadboard mounted on the LiPo battery pack:

Halloween Pumpkin breadboard

I have also made a little video clip and uploaded it to YT (do a CTRL+click for opening in new tab of your browser):

Watch the video

Parts list

Following parts I have used in this project:

  • breadboard half+ (400 holes)
  • wire jumpers
  • LiPo battery pack
  • USB cable with mini USB plug
  • breadboard power supply (with Mini-USB-Input)
  • Wemos D1 Mini pro (ESP8266)
  • Neopixel RGB LED ring, diameter 50 mm (with 12 seperate controllable RGB LEDs by WS2812B chip)
  • DFPlayer mini MP3 player module
  • microSD card (16 GB)
  • passive speaker (2 W, 8 Ohm)
  • PIR module (motion sensor based on HC-SR501)
  • resistor 1 kOhm (for protecting RxD input of DFPlayer)
  • capacitor 1000 µF (protecting the Neopixel LED module)

Breadboard layout and schematics

With Fritzing (https://fritzing.org) I have created following breadboard layout:

Breadboard Layout

The schematics looks like this:

Schematics

Software libraries and documentation

Neopixel RGB LED ring

Install the FastLED library: https://github.com/FastLED/FastLED.

DFPlayer Mini

Install the DFMiniMp3 library "DFPlayer Mini Mp3 by Makuna": https://github.com/Makuna/DFMiniMp3. Documentation you will find at: https://wiki.dfrobot.com/DFPlayer_Mini_SKU_DFR0299.

PIR module

The sensor output pin has to be connected to a interrupt capable input pin. No special library is needed. Cover the interrupt service routine (ISR) by ICACHE_RAM_ATTR to run the interrupt code in RAM, otherwise code is stored in flash and it’s slower.

void ICACHE_RAM_ATTR interrupt_pir_motion_detection() {

}

SDcard: file/folder layout

The DFPlayer and the DFMiniMp3 library expects the sd card to contain these mp3 files like this folder/file scheme:

sd:/mp3/0001_xxx.mp3
sd:/mp3/0002_xxx.mp3
sd:/mp3/0003_xxx.mp3

License

This project is licensed under the terms of "GNU General Public License v3.0". For details see LICENSE.

io_esp8266_neopixel_pir_halloween_gh's People

Contributors

urmel79 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

dwasus62

io_esp8266_neopixel_pir_halloween_gh's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.