Skip to content

Instantly share code, notes, and snippets.

View rwaldron's full-sized avatar

Rick Waldron rwaldron

  • Boston, MA
View GitHub Profile
@mzgoddard
mzgoddard / tessel-api-mockup.rs
Last active March 6, 2017 21:34
Mockup a Tessel API covering the same basic APIs as Tessel JS
//
// Examples
//
mod examples {
fn main() {
// Different ways to get a single pwm pin.
//
// These earlier ones are a bit wasteful as they also create the leds
@mzgoddard
mzgoddard / tessel-spi-neopixels.js
Created January 16, 2017 19:54
Animate a 12 component adafruit neopixel ring with SPI
// Import the interface to Tessel hardware
var tessel = require('tessel');
var port = tessel.port.A;
var spi = new port.SPI({
clockSpeed: 3.2*1000*1000, // 3.2MHz
cpol: 0, // Polarity - optional
cpha: 0, // Clock phase - optional
chipSelect: port.pin[7] // Chip select - optional