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
Raspberry Pi 3 Home Automation Projects

You're reading from   Raspberry Pi 3 Home Automation Projects Bringing your home to life using Raspberry Pi 3, Arduino, and ESP8266

Arrow left icon
Product type Paperback
Published in Nov 2017
Publisher Packt
ISBN-13 9781783283873
Length 226 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Shantanu Bhadoria Shantanu Bhadoria
Author Profile Icon Shantanu Bhadoria
Shantanu Bhadoria
Ruben Oliva Ramos Ruben Oliva Ramos
Author Profile Icon Ruben Oliva Ramos
Ruben Oliva Ramos
Arrow right icon
View More author details
Toc

Table of Contents (7) Chapters Close

Programming the button

We're are programming a Netflix TV remote control, and we see the code for testing the sending signals from the Particle Photon to the TV.

Testing the code for remote control for a Netflix TV

In the following sketch, we show an example of programming the button:

//Before using, make sure you get your IR timings and add your hue bridge IP/dev username in the appropriate places.

//To keep it as simple as possible, this does not contain any code for the optional LEDs on the case. We light up our indicators and logo after the button is pressed.

TCPClient client;

#define PIN_IR A0
#define PIN D0
#define NUM_PULSES 68

//specific to your TV
int pulse_widths[NUM_PULSES][2] = {
{62116, 8860}, {4360, 540}, {520...
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