Introduction: An IoT Halloween Pumpkin | Control LEDs With an Arduino MKR1000 and Blynk App πŸŽƒπŸ‘»πŸ­

Hello Everyone,

A few weeks past was Halloween and following the tradition I sliced out a gracious Cucurbita pepo for my balcony. But having my pumpkin outdoor, I realised that information technology was quite plaguy to have to travel out every evening to light high the candle. And I also realised that it would live many funny, if I could vary the colour of the candela light.

If you need to learn how to automatise your pumpkin's lights and equal capable to have varied colour lighting awake your Halloween pumpkin, this teacher is for you.

Hither I will first show you how to use an IoT device (here an Arduino MKR1000) to control the On-off switch of your pumpkin lights (RGB LED Neopixel Ring). In a second time, I will also bear witness you how to set varied lights colour using your smartphone. πŸ“±πŸŽƒπŸ’₯

Army of the Pure's get started !

Supplies

Here is the list of the components, you will need for this project. If you deman to purchase any of the components, have a look at eBay operating theatre Amazon, you can purchase them for a fair price.

  • A pumpkin
  • Arduino MKR1000
  • Neopixel Telephone - 12 RGB LED (SK6812)
  • 1000Β΅F Capacitor
  • 470Ξ© Resistor
  • 3.7V 2000mAh LiPo Barrage fire - if not powered via USB Micro
  • About jumper wires
  • A solder iron

Whole step 1: Carving Out Your Pumpkin!

Have fun and bask the pumpkin soup with the pumpkin flesh you edit out from the inner part πŸŽƒπŸ˜‹

Step 2: Wire the Electronics Components

Understand your components

You will find the wiring plot for this project below. In front opening the wiring, there are some few things you may have to consider.

  1. Which Arduino microcontroller plank are you using? Does you board has 5V or 3.3V input? Does you board has a 5V power output pin?
  2. What is the size of your LED Neopixel mob - 12, 16, 24 pixel?
  3. How are you sledding to power your Arduino microcontroller and your LEDs?

In this see, I chose to use an Arduino MKR1000, which has an embedded WiFi chip. I decided to collocate with this Arduino as I wanted to be able to dominance my Arduino from my smartphone via WiFi. Also, I already had this board at home and wasn't using for anything else. Some other option would live to use an Arduino Uno, Nano or any other Arduino with a ESP8266 WiFi mental faculty.

Compared to other Arduino, the MKR1000 runs at 3.3V. While you buttocks append 5V to the board via the USB left, you stool't delivered much 3.3V to the I/O pins. The MKR1000 has a 5V pin, which can be wont to world power 5V devices. In our case, we bequeath use up this rowlock to power our Neopixel ring. If you are using larger ring such as 16, 24 or more pixels, you may want to consider using a disjoined power append.

The Cucurbita pepo and electronics will be on my balcony and so we will use a 3.7V LiPo battery to power our Arduino and the Neopixel. The MKR1000 BatteryLife tutorial is helpful to help you decide the capacity of the battery you are going away to use. As I did non want to recharge the barrage every day, I opted for a 2000mAh battery. Moreover, I decided to put the Arduino happening standby mode when not lighting leading my pumpkin vine. This helps to reduce magnate consumption as the WiFi mental faculty is move around off.

Wire your components

  • Solder the capacitor directly to the Neopixel ring. Negative side to GND and positive side to 5V
  • Solder the 470Ξ© resistor to the Data In (DI) pin
  • Connect the 5V bowling pin of the Arduino to the 5V of the Neopixel using a jumper wire
  • Connect the GND pin of the Arduino to the GND of the Neopixel using a jumper telegram
  • Connect the #4 Digital stick of the Arduino to the DI of the Neopixel exploitation a jump shot wire

Once this is finished, you will need to open the "IoT-Allhallows Eve-Pumpkin" GitHub folder and make many little changes to the code before uploading it to your Arduino. Promise you are ready for a routine of programming!! πŸ₯πŸ€–πŸ‘©πŸ’»

Tone 3: Computer programing Your Pumpkin

Program your Arduino

In this project, we want to program our Arduino so that the following is achieved:

  • The Arduino is connected to the Blynk App via WiFi.
  • The colours of the Neopixel lights are changed via the Blynk App.

You bum happen the code for this project in my "IoT Halloween Pumpkin" GithHub repository. But before you poke into it, you Crataegus oxycantha want to scan about a couple of things that I have learned while doing this project! πŸ’₯πŸ‘ΎπŸ¦Έ

LED Light Shows

The addressable LEDs or in Adafruit's language "NeoPixel" much as WS2812, WS2811 and SK6812 Light-emitting diode drivers can be controlled victimization Adafruit NeoPixel subroutine library. If it is the first time you are using NeoPixel, I will highly recommend you to take a look at Adafruit NeoPixel Uberguide. Full of advice and tips, it is a heavy resourcefulness!

To erect a LED colouring material to your pumpkin, you will have to send RGB values to your Arduino/NeoPixel. The simplest is to look at the colour code of some colours! Spiro Discotheque Blue, Harlequin, Narcissus pseudonarcissus or Pink wine Bonbon, here are some cool one.

A funnier way is to have colors on your NeoPixel "saltation". If you are truly motivated, give it a go! Otherwise, hold Tweaking4All LEDStrip Effects web log post. You will find code for some beautiful amazing lighting effects. Another great resource is the Neopixel Core Author by Adriano.

Blynk App

The Blynk App is one of the all but touristy IoT platform. The Blynk App is incredibly easy to use and in less than 5 minutes you bequeath be able to create an IoT app on your smartphone to communicate via Cyberspace with your IoT device. Before tailoring your Blynk App to your ask, you will need to:

1. Download the Blynk app

2. Install the Blynk library

3. Set upfield the connection to your IoT device

The Blynk App has published enthusiastic documentations to help everyone getting started. Have a look up here if American Samoa me, it is your opening time using it.

Step 4: Enjoy!

Congratulations, you can now sit well in your sofa and use your smartphone to check the LEDs' colours of your Hallowe'en pumpkin. πŸ₯πŸŽƒπŸ’₯

Thank you for reading through my project. I trust you enjoy it and IT will barrack you to undertake something similar for your LEDs on your Flame tree, on your overwinter snowman, or anything else!

Be the First to Portion out

Recommendations

  • Anything Goes Repugn 2022

    Anything Goes Contest 2022