git clone https://github.com/autumnai/collenchyma.git
// Checkout the library for abstracting GPU/Native implementationscd collenchyma; git remote add j https://github.com/johnnyman727/collenchyma.git; git fetch j; git checkout correct-commit
// Check out commit that fixes OSX builds- Open
Cargo.toml
in a text editor and remove "cuda" from this line // Macbook Air's don't have NVidia GPUs so CUDA is useless cd ../; git clone https://github.com/autumnai/collenchyma-blas.git; cd collenchyma-blas
// Enter our BLAS Plugin directory- Open
Cargo.toml
in a text editor and addpath = "../collenchyma"
as a property to this line // Use our local version with fix for OSX - Once again, remove "cuda" fr
This file contains 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 tessel = require('tessel'); | |
var blePort = tessel.port('a'); | |
var bleDriver = require('../'); | |
bluetooth = bleDriver.use(blePort, function(err) { | |
if (err) { | |
return console.log("Failed to connect"); | |
} | |
else { | |
// Connect to moosh |
This file contains 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 fs = require('fs'); | |
function parseIntelHexData(path, callback) { | |
var hex = fs.readFileSync(path).toString(); | |
console.log('loaded file'); | |
// Split the file into lines | |
var hexLines = hex.split('\n'); | |
// The last line is an empty string | |
hexLines.pop(); |
This file contains 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 tessel = require('tessel'); | |
var https = require('https'); | |
var querystring = require('querystring'); | |
// Build the post string from an object | |
var post_data = querystring.stringify({ | |
'accel-x' : '1.24353', | |
'accel-y': '-.543653', | |
'accel-z': '0.021234', | |
}); |
This file contains 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 tessel = require('tessel'); | |
var blePort = tessel.port['A']; | |
var bleLib = require('ble-ble113a'); | |
var data = new Buffer('0201061aff4c000215e2c56db5dffb48d2b060d0f5a71096e000000000c6','hex'); | |
var ble = bleLib.use(blePort, function(err) { | |
if (err) return console.log("Error connecting to slave", err); | |
ble.setAdvertisingData(data, function (e2){ | |
if (e2) console.log("Error set adv", e2); |
This file contains 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 http = require('http'); | |
var state = 1; | |
function toggleLED() { | |
// Change the IP Address to your Tessel's IP Address! | |
var path = 'http://172.20.10.5:8080/green/' + state | |
console.log('getting at', path); | |
http.get(path, function(res) { |
This file contains 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 mqtt = require('mqtt') | |
// Make sure to change this to the IP address of your MQTT server | |
, host = '192.168.128.204' // or localhost | |
client = mqtt.createClient(1883, host, {keepalive: 10000}); | |
// Subscribe to the temperature topic | |
client.subscribe('temperature'); | |
// When a temperature is published, it will show up here | |
client.on('message', function (topic, message) { |
This file contains 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
require('tesselate')(['ble-ble113a', 'climate-si7020', 'ambient-attx4', 'camera-vc0706'], function(tessel, modules) { | |
console.log('connected!'); | |
modules.climate.readTemperature(message, function (err, temp) { | |
modules.climate.readHumidity(function (err, humid) { | |
console.log(temp + ":" + humid); | |
modules.ambient.getLightLevel(function (err, ldata) { | |
if (err) | |
throw err; | |
modules.ambient.getSoundLevel(function (err, sdata) { |
This file contains 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 tessel = require('tessel'); | |
var ambientLib = require('ambient-attx4'); | |
var animations = require('neopixel-animations'); | |
var Neopixels = require('neopixels'); | |
var neopixels = new Neopixels(); | |
var ambient = ambientLib.use(tessel.port.A); | |
var numLEDs = 60; | |
var helpFactor = 10; |
OlderNewer