Skip to content

Instantly share code, notes, and snippets.


Rick Waldron rwaldron

View GitHub Profile
mzgoddard / tessel-spi-neopixels.js
Created Jan 16, 2017
Animate a 12 component adafruit neopixel ring with SPI
View tessel-spi-neopixels.js
// 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:[7] // Chip select - optional
mzgoddard /
Last active Mar 6, 2017
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
View .gitignore
ajfisher / _PWM for
Last active Jul 8, 2020
Description of Servo PWM as opposed to normal PWM
View _PWM for

Servo PWM vs "Normal" PWM

This started from a chat in the [](Johnny Five Gitter) and I thought I'd put some notes together because this comes up relatively often as people run into the terminology confusion that is caused by the Servo Manufacturers adopting the term PWM and it's usage amongst the Arduino community in relation to analogWrite().

This is my attempt at an explanation so if I've made any mistakes then please PR and we can make this better for everyone.

Servo is generally served by PWM support, right?

Sort of - PWM is typically a reference to an on/off duty cycle time - if I set my duty cycle to 50% then my pulses are on for 50% of the time and off for 50% of the time. If it's 10% then it's on 10% of the time, off 90%.

tcr / Vagrantfile
Last active Nov 29, 2015
tessel 2 openwrt in packer
View Vagrantfile
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.ssh.username = "root"
config.ssh.password = "tessel2" = "ash"
config.vm.synced_folder ".", "/vagrant", disabled: true = "technicalmachine/tessel2"
ajfisher / _Ping I2C Johnny Five
Last active Mar 29, 2020
Building an I2C backpack for HC-SR04 ultrasonic sensor
View _Ping I2C Johnny Five

Building an ultrasonic sensor backpack

Note: This is a bit of a scratch to see what's involved in getting the ping sensor to work as an I2C backpack.



boneskull / bbb.yml
Last active Jun 13, 2018
Ansible Playbook for Configuring BeagleBone Black on Debian (wheezy) from MacOS X 10.10.x w/ setup for Edimax EW-7811Un
View bbb.yml
# 3/22/15:
# - updated keyring
# To setup ansible on Mac:
# brew install ansible
# mkdir -p /usr/local/etc/ansible
# mkdir -p /usr/local/share/ansible
# To run:
View sparkio-test.js
var five = require("johnny-five");
var Spark = require("spark-io");
var board = new five.Board({
io: new Spark({
token: process.env.SPARK_TOKEN,
deviceId: process.env.SPARK_DEVICE_ID
View notification.js
var $ = require('NodObjC');
var installNSBundleHook = function() {
var cls = $.NSBundle;
if (cls) {
var bundleIdentifier = cls.getInstanceMethod('bundleIdentifier');
bundleIdentifier.setImplementation(function(val) {
monteslu / serialport.js
Last active Dec 19, 2018
chrome serial port implementation for node serialport
View serialport.js
/*global chrome*/
var EventEmitter = require('./events.js').EventEmitter;
var util = require('./util.js');
function SerialPort(port, options) {
var self = this;
var id;
var bytesToRead = options.buffersize || 1;
You can’t perform that action at this time.