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 color = require("colors") | |
var EventEmitter = require('events').EventEmitter; | |
var util = require('util'); | |
var q = require('q'); | |
var fs = require('fs'); | |
const commandLineArgs = require("command-line-args"); | |
/* |
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 color = require("colors") | |
var EventEmitter = require('events').EventEmitter; | |
var util = require('util'); | |
var q = require('q'); | |
var fs = require('fs'); | |
const commandLineArgs = require("command-line-args"); | |
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
#Default Packages | |
sudo apt-get install vim curl wget build-essential | |
#Setup Wifi | |
nmcli dev wifi con "myssid" password "myssidpassword" | |
#Install NodeJS | |
curl -sL https://deb.nodesource.com/setup_5.x | bash - | |
apt-get install -y nodejs |
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
{ | |
"tinyg_settings": { | |
"version":1.0, | |
"last_update":2242015, | |
"setting_groups": [ | |
{ | |
"motor_group": [ | |
{ | |
"sn": "ma", | |
"ln": "map axis", |
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 tgSettings = angular.module('tgSettings', []); | |
tgSettings.controller('settingsController', function($scope, $http){ | |
$scope.axis = "X"; | |
}) |
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
#!/usr/bin/python | |
from random import randint, uniform | |
from decimal import Decimal | |
#random file | |
xmax = 1524 | |
ymax = 1524 | |
shotmax = 30 |
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 VELOCITY_ACCURACY = 1 | |
var calcPen = function(zLen){ | |
//Pendulum Movement Equation | |
//T = 2pi*SQRT(L/g) | |
var twoPi = 6.2831926 | |
var gravity = 9.8 | |
var result = twoPi * Math.sqrt(zLen / gravity); | |
return(result.toFixed(4)) | |
} |
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
//Wrecking Ball Demo | |
//var feed = 21538 | |
//var axis = "Y" | |
var calcPendulum = function(zLen){ | |
//Pendulum Movement Equation | |
//T = 2pi*SQRT(L/g) | |
var twoPi = 6.2831926 | |
var gravity = 9.8 |
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
while (!tg.getClearToSend()) { | |
//Not ready yet | |
Thread.sleep(1); | |
//We have to check again while in the sleeping thread that sometime | |
//during waiting for the clearbuffer the serialport has not been disconnected. | |
//And cancel has not been called | |
if (!tg.isConnected()) { | |
console.appendText("[!]Serial Port Disconnected.... Stopping file sending task..."); | |
return false; | |
} else if (tg.isCANCELLED()) { |
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
package com.synthetos; | |
import android.app.Activity; | |
import android.content.Context; | |
import android.os.Build; | |
import android.os.Build.VERSION; | |
import android.os.Bundle; | |
import android.telephony.SmsManager; | |
import android.telephony.TelephonyManager; | |
import android.view.View; |