This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | from __future__ import print_function | |
| import urllib | |
| import urllib2 | |
| octoblu_trigger = "https://triggers.octoblu.com/v2/flows/3791898c-6234-4c57-a860-92a8e6c616fc/triggers/6b5c0082-37ab-459b-9912-8228ccb43a15" | |
| # --------------- Helpers that build all of the responses ---------------------- | |
| def build_speechlet_response(output): | |
| return { | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | var ws281x = require('rpi-ws281x-native'); | |
| var meshblu = require('meshblu'); | |
| var meshbluJSON = require("./meshblu.json"); | |
| var tinycolor = require("tinycolor2"); | |
| var mic = require('microphone'); | |
| var VUMeter = require('vu-meter') | |
| var mqtt = require('mqtt'); | |
| var font5x7 = require('./font.js'); | |
| var fs = require('fs'); | |
| try { | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import os | |
| import signal | |
| import uuid | |
| import threading | |
| import sys | |
| import time | |
| import datetime | |
| import subprocess | |
| import paho.mqtt.client as mqtt | |
| import evdev | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | var Client = require('azure-iothub').Client; | |
| var Message = require('azure-iot-common').Message; | |
| function printResultFor(op) { | |
| return function printResult(context, err, res) { | |
| context.log('printResult for ' + op); | |
| if (err) context.log(op + ' error: ' + err.toString()); | |
| if (res) context.log(op + ' status: ' + res.constructor.name); | |
| if (err) { | |
| context.res = { | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | { | |
| "dependencies": { | |
| "azure-iothub": "^1.1.17", | |
| "azure-iot-common": "^1.2.0" | |
| } | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | var request = require('request'); | |
| function jrbHomeAutomation(context, event) { | |
| context.log("jrbHomeAutomation event " + JSON.stringify(event)); | |
| if ((event.topic) && (event.message)) { | |
| switch (event.topic) { | |
| case "Alert": | |
| request({ | |
| url: "<logic app trigger URL>", | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | var SerialPort = require("serialport"); | |
| var clientFromConnectionString = require('azure-iot-device-amqp').clientFromConnectionString; | |
| var tinycolor2 = require("tinycolor2"); | |
| var connectionString = "<IoT Hub connection string>"; | |
| var portdev = "/dev/ttyACM0"; | |
| var port = new SerialPort(portdev, { | |
| baudRate: 9600, | |
| }); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #include <Adafruit_NeoPixel.h> | |
| #define WS2811_PIN 6 | |
| #define WS2811_LED_COUNT 20 | |
| // Set to true to flash the LEDs on and off at approx 1Hz | |
| boolean flash = false; | |
| // The target color for the LED string, indexed by LED number | |
| int target_r[WS2811_LED_COUNT]; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // Alexa skill handler for the "Citrix" demo skill. | |
| // | |
| // This runs as an Azure Function and must have the NPM libraries installed into the | |
| // Function App image: ensure that package.json is populated with the required | |
| // dependencies and follow the instructions at | |
| // https://docs.microsoft.com/en-us/azure/azure-functions/functions-reference-node#node-version-and-package-management | |
| // | |
| // Example package.json: | |
| // { | |
| // "dependencies": { | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | var SerialPort = require("serialport"); | |
| var tinycolor2 = require("tinycolor2"); | |
| var request = require('request'); | |
| var portdev = "/dev/ttyACM0"; | |
| var port = new SerialPort(portdev, { | |
| baudRate: 9600, | |
| }); | |
| port.on('error', function(err) { |