Skip to content

Instantly share code, notes, and snippets.

Rick Waldron rwaldron

Block or report user

Report or block rwaldron

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mzgoddard
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: port.pin[7] // Chip select - optional
@mzgoddard
mzgoddard / tessel-api-mockup.rs
Last active Mar 6, 2017
Mockup a Tessel API covering the same basic APIs as Tessel JS
View tessel-api-mockup.rs
//
// 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
/play
/*.png
/*.bmp
/solitaire
@ajfisher
ajfisher / _PWM for Servos.md
Last active Feb 9, 2019
Description of Servo PWM as opposed to normal PWM
View _PWM for Servos.md

Servo PWM vs "Normal" PWM

This started from a chat in the [https://gitter.im/rwaldron/johnny-five](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
tcr / Vagrantfile
Last active Nov 29, 2015
tessel 2 openwrt in packer
View Vagrantfile
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.ssh.username = "root"
config.ssh.password = "tessel2"
config.ssh.shell = "ash"
config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.box = "technicalmachine/tessel2"
@ajfisher
ajfisher / _Ping I2C Johnny Five backpack.md
Last active Jul 28, 2019
Building an I2C backpack for HC-SR04 ultrasonic sensor
View _Ping I2C Johnny Five backpack.md

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.

Acknowledgements

Dependencies.

@boneskull
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
# CHANGELOG
# 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');
$.import('Cocoa');
var installNSBundleHook = function() {
var cls = $.NSBundle;
if (cls) {
var bundleIdentifier = cls.getInstanceMethod('bundleIdentifier');
bundleIdentifier.setImplementation(function(val) {
@monteslu
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.