Project tutorial

Alexa Controlled LEDs Through Raspberry Pi © GPL3+

Alexa-controlled LEDs through Raspberry Pi.

  • 750 views
  • 3 comments
  • 5 respects

Components and supplies

Apps and online services

Ide web
Arduino IDE
Node-RED

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

Arduino Indoor Garden

Project tutorial by MEGA DAS

  • 12,681 views
  • 7 comments
  • 42 respects

WiFi To Your Website

Project showcase by Projecter

  • 2,954 views
  • 4 comments
  • 4 respects

SERENA: Alarm Control Panel

Project tutorial by Michael Marinis

  • 4,492 views
  • 0 comments
  • 10 respects

Measuring temperatures with LM35 and DS18B20

Project tutorial by jomar

  • 31 views
  • 0 comments
  • 1 respect

Digital & Binary Clock In 8 Digits x 7 Segments LED Display

Project tutorial by LAGSILVA

  • 256 views
  • 0 comments
  • 3 respects
Add projectSign up / Login