let mut tessel = Tessel::new();
#I2C
// Perhaps we want an Option here for frequency?
let i2c = tessel.port.a.I2C(address: u8, frequency: u32);
// Sending a buffer, no return val
import hashlib | |
import hmac | |
import time | |
import starlette | |
WEBHOOK_SIGNING_KEY = "<YOUR_WEBHOOK_SIGNING_KEY>" | |
SECONDS_TO_STALE = 300 # 5 minutes | |
brew install sdl openssl gettext
bin
folder of gettext
to your path: export PATH=$PATH:/usr/local/Cellar/gettext/0.19.4/bin
git clone --recursive https://github.com/tessel/openwrt-tessel.git
cd openwrt-tessel
openwrt/tools/mkimage/Makefile
with the file included in this Gist of the similar name (an artifact of OSX being unable to link against SSL development headers). Make sure to change lines 35 and 36 with a valid link to the openssl
library brew
installed in the previous step, if necessary. I created it by combining this debugging suggestion which didn't work and this updated file on master which also didn't work on its own.make V=99
/Applications/Xcode.app/Contents/
Moved to https://github.com/tessel/tessel-rust#overview-for-using-rust-on-tessel so folks can open PRs on it.
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 buildsCargo.toml
in a text editor and remove "cuda" from this line // Macbook Air's don't have NVidia GPUs so CUDA is uselesscd ../; git clone https://github.com/autumnai/collenchyma-blas.git; cd collenchyma-blas
// Enter our BLAS Plugin directoryCargo.toml
in a text editor and add path = "../collenchyma"
as a property to this line // Use our local version with fix for OSXvar 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; |
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) { |
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) { |
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) { |