Pith - arduino_maker_crown
arduino_maker_crown/pebble_maker_crown.js [1.2 kb]
Modified: 22:52:22 56 026 (14 May 026)
16 Days Ago
// Maker Crown Peddle APP
// vgmlr
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, 15), 
    size: new Vector2(144, 30),
    font: 'Gothic 28 Bold',
    text: 'RISE',
    textAlign: 'center',            
    color: 'white'
});
//this is going to be our off button
var txtOffLabel = new UI.Text({     
    position: new Vector2(0, 95),
    size: new Vector2(144, 30),
    font: 'Gothic 28 Bold',
    text: 'BATTLE',
    textAlign: 'center',
    color: 'white'
});
main_window.backgroundColor('black');
main_window.add(txtOnLabel);
main_window.add(txtOffLabel);
main_window.show(); 
// URL To MKR1000 (Change)
function Toggle(function_name){
  var URL = 'http://192.168.1.9/' + function_name;
  ajax( 
    {
      url: URL,
      method: 'post', 
      type: 'json',
      data: { "args": function_name}
    }
  );
}
// Rise
main_window.on('click', 'up', function() {
  Toggle('R');
});
// Battle
main_window.on('click', 'down', function() {
  Toggle('B');
});
// Seated
main_window.on('click', 'select', function() {
  Toggle('S');
});
Updates
Shim - Android 70.026.1
Wedge - Linux 68.026.1
Wedge - Android 68.026.1
Taper - Linux 64.026.1
Ayh Extension - Chrome 63.026.1
Dev
TVShow (227) 'CSA'
TVShow (228) 'APT'
TVProgram (83) 'BXT'
Miter Update(s)
Shim (Dictation)

Menu
Calendar
Project Tin (024/029)
Miter
RSS Feed
User Avatar
@vgmlr
=SUM(parts)