Having discovered several spare Midichlorians in my liquor cabinet, I trained and applied them to opening a large cumbersome gate. The FORCE motion travels through my inner what-nots and is translated by the Pebble Classic accelerometer toggling a command sent to the (Particle) Cloud (City) which returns to the Particle Photon triggering a TIP120 to fire a button on an existing RF transceiver.
May the ridiculous hand gestures be with you, always.
int gateJedi(String command) { if (command=="open") { digitalWrite(sig,HIGH); delay(3000); digitalWrite(sig,LOW); command = 0; } else { digitalWrite(sig,LOW); } }
Pebble.js Gate Jedi APP
// Gate Jedi Peddle APP (Version 1.3) // Vije Miller // Pebble Blink APP @Jack-Dangerfield
var Accel = require('ui/accel'); Accel.init(); var UI = require('ui'); var ajax = require('ajax'); var Vector2 = require('vector2');
// Create Window var main_window = new UI.Window();
// Open Button and Display var txtOnLabel = new UI.Text({ position: new Vector2(0, 50), size: new Vector2(144, 30), font: 'Gothic 28 Bold', text: 'GATE JEDI', textAlign: 'center', color: 'white' });
// Display Main Window main_window.backgroundColor('black'); main_window.add(txtOnLabel); main_window.show();
// URL To Particle Cloud function Toggle(function_name,function_value){ var URL = 'https://api.particle.io/v1/devices/DEVICE ID/' + function_name +'?access_token=TOKEN';