Skip to content

Instantly share code, notes, and snippets.

View gopal-amlekar's full-sized avatar

Gopal Amlekar gopal-amlekar

View GitHub Profile
@gopal-amlekar
gopal-amlekar / watson-sense-hat.js
Created August 22, 2017 16:07
Short code to interpret commands and parse it to sense hat
// screen on command to turn on the entire display to Red. Otherwise it stays green.
// Extend the function to interpret more commands as required.
// Sense hat commands are described in the info for sense hat node.
if (msg.payload === 'screen on'){
msg.payload = '*,*,red';
}
else{
msg.payload = '*,*,green';
}