Project tutorial
Alexa Controlled LEDs Through Raspberry Pi

Alexa Controlled LEDs Through Raspberry Pi © GPL3+

Alexa-controlled LEDs through Raspberry Pi.

  • 6,198 views
  • 6 comments
  • 27 respects

Components and supplies

Apps and online services

About this project

Introduction

It turns out that it is quite easy to get Alexa communicate with Arduino via Raspberry Pi with Node-RED. All you have to do is installing two Node-RED modules and setup up a Node-RED Flow with Alexa Local and Arduino nodes. Here I have a project which has Alexa turn on and off two LED lights as a demo.

Step 1. Setup Raspberry Pi

Follow this step to get your Raspberry Pi ready.

Step 2. Install Node-RED

Follow this step to install Node-RED.

Step 3. Install the Arduino node

Follow this step to install the Arduino node for Node-RED. I am using Firmata in this project. You need to upload the Standard Firmata to the Arduino Uno, follow this link to accomplish that.

Step 4. Install the Alexa Local

Follow this step to install the Alexa Local Node-RED module.

Step 5. Setup the Node-RED Flow

Import the Node-RED Flow from the code section below.

Testing Time

.

Demo video

Code

noderedflow.jsJavaScript
import this to node-red editor
[{"id":"7cfb7d9e.1371f4","type":"alexa-local","z":"8496b3f6.919b5","devicename":"yellow light","inputtrigger":false,"x":177.10000610351562,"y":175,"wires":[["b9b6f9c0.383058","677a99d9.49b6c8"]]},{"id":"b9b6f9c0.383058","type":"debug","z":"8496b3f6.919b5","name":"","active":true,"console":"false","complete":"true","x":336.10005950927734,"y":233.00000476837158,"wires":[]},{"id":"23e77dc0.c2d532","type":"alexa-local","z":"8496b3f6.919b5","devicename":"green light","inputtrigger":false,"x":157.10000610351562,"y":287,"wires":[["b9b6f9c0.383058","b7bd4e01.3cc47"]]},{"id":"677a99d9.49b6c8","type":"arduino out","z":"8496b3f6.919b5","name":"","pin":"11","state":"OUTPUT","arduino":"4326cda4.263274","x":530.1000633239746,"y":172.6000099182129,"wires":[]},{"id":"b7bd4e01.3cc47","type":"arduino out","z":"8496b3f6.919b5","name":"","pin":"12","state":"OUTPUT","arduino":"4326cda4.263274","x":531.1000366210938,"y":290.6000061035156,"wires":[]},{"id":"4326cda4.263274","type":"arduino-board","z":"","device":"/dev/ttyACM0"}]

Schematics

Pi Arduino LEDS breadboard
Pi arduino leds bb bccyfzpyqz

Comments

Similar projects you might like

Anna: Alexa Powered Interactive Light

Project tutorial by vincent wong

  • 1,900 views
  • 0 comments
  • 7 respects

Alexa Controlled LEDs Through Arduino Yún

Project tutorial by Ben Eagan

  • 16,857 views
  • 10 comments
  • 24 respects

Arduino + Raspberry Pi + Ubidots Made Easy

Project tutorial by David Escobar

  • 13,097 views
  • 4 comments
  • 38 respects

Enable Alexa Control to your Ceiling Fan

Project tutorial by Jithin Thulase

  • 3,124 views
  • 5 comments
  • 9 respects

Home Automation Using Raspberry Pi 2 And Windows 10 IoT

Project tutorial by Anurag S. Vasanwala

  • 297,340 views
  • 98 comments
  • 706 respects
Add projectSign up / Login