Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Raspberry Pi 3 Home Automation Projects

You're reading from  Raspberry Pi 3 Home Automation Projects

Product type Book
Published in Nov 2017
Publisher Packt
ISBN-13 9781783283873
Pages 226 pages
Edition 1st Edition
Languages
Authors (2):
Shantanu Bhadoria Shantanu Bhadoria
Profile icon Shantanu Bhadoria
Ruben Oliva Ramos Ruben Oliva Ramos
Profile icon Ruben Oliva Ramos
View More author details
Toc

Programming the ESP8266 Huzzah for CheerLights

In this section, we will learn how to program the ESP8266 Huzzah to link up with the CheerLights API and talk to NeoPixels.

Let's try a simple single-color display

We are almost done with our funky networked blinking lights now; all we need to do is program the ESP8266 with the CheerLights code. For this, connect the ESP8266 with your computer again and switch back to the Arduino IDE:

  1. Include the libraries: The first thing we need to do in the code is include the libraries we will need. We need the Adafruit NeoPixel library and ESP8266WiFi library. Start with including these libraries:

        /* CheerLights
* Let the world set your LED strip's color using...
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 £13.99/month. Cancel anytime