Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Internet of Things with Arduino Cookbook

You're reading from   Internet of Things with Arduino Cookbook Build exciting IoT projects using the Arduino platform

Arrow left icon
Product type Paperback
Published in Sep 2016
Publisher Packt
ISBN-13 9781785286582
Length 188 pages
Edition 1st Edition
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Marco Schwartz Marco Schwartz
Author Profile Icon Marco Schwartz
Marco Schwartz
Arrow right icon
View More author details
Toc

Table of Contents (9) Chapters Close

Preface 1. Connecting an Arduino to the Web FREE CHAPTER 2. Cloud Data Monitoring 3. Interacting with Web Services 4. Machine-to-Machine Interactions 5. Home Automation Projects 6. Fun Internet of Things Projects 7. Mobile Robot Applications Index

Building a digital candle


In this recipe, we are going to learn how to make a digital version of a candle using Arduino. We'll see how to control a multicolor LED to emulate the behavior of a real candle. It's just the perfect project for Valentine's Day, Christmas, and other celebrations.

Getting ready

For this project, the only thing you will need is an Adafruit NeoPixel, which is a smart RGB LED that can be easily controlled via Arduino.

I also used some alligator clips to connect the Arduino board to the NeoPixel.

Assembling the project is really easy – you just need to connect the NeoPixel input pin to Arduino pin 5, GND to GND, and VCC to VCC of the Arduino board.

This is the final result:

On the software side, the only thing you need is to install the Adafruit_NeoPixel library, which you can install from the Arduino library manager.

How to do it...

Let's now see how to configure the project. The first step is to include the required library, and declare that the NeoPixel is connected to pin...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime