Pith - arduino_maker_crown
arduino_maker_crown/pebble_maker_crown.js [1.2 kb]
Modified: 22:52:22 56 026 (14 May 026)
72 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
Wedge - Android 126.026
Wedge - Linux 124.026
Shim - Android 117.026
Miter - 114.026
Kerf - Android 112.026
Dev
TVShow (227) 'CSA'
TVShow (228) 'APT'
TVProgram (83) 'BXT'
Miter Update(s)
Peen (Messaging)

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