Skip to content

Instantly share code, notes, and snippets.

View rwaldron's full-sized avatar

Rick Waldron rwaldron

  • Boston, MA
View GitHub Profile
@probonopd
probonopd / Arduino Yun (Linino) on OpenWrt
Last active December 21, 2021 06:28
Install Arduino Yun (Linino) software on OpenWrt on 3rd-party devices. TODO: Fully automate install and/or use Linino rootfs image and/or build own firmware using OpenWrt Image Generator. CAVEATS: I have not yet found out how to make the Bridge use Serial (USB) instead of Serial1 (HardwareSerial) for the Leonardo. I have asked a question about t…
opkg install luci-lib-json luci rng-tools usbutils avrdude avahi-daemon
# If rng-tools is not installable, then install it by hand from e.g., http://download.linino.org/linino_distro/linino_dev/latest/packages/rng-tools_3-2_ar71xx.ipk
# Edit your /etc/opkg.conf, add
src/gz barrier_breaker http://download.linino.org/dogstick/all-in-one/latest/packages/
# Comment out your earlier src/gz
opkg update
opkg list|grep bridge
@boneskull
boneskull / bbb.yml
Last active June 3, 2021 11:26
Ansible Playbook for Configuring BeagleBone Black on Debian (wheezy) from MacOS X 10.10.x w/ setup for Edimax EW-7811Un
# 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:
@ajfisher
ajfisher / _Ping I2C Johnny Five backpack.md
Last active March 24, 2021 16:20
Building an I2C backpack for HC-SR04 ultrasonic sensor

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.

@ajfisher
ajfisher / firmatatest.js
Last active December 22, 2019 08:15
Serial comms over hardware UART for Johnny-Five between Arduino and a Raspberry Pi
var firmata = require('firmata');
var repl = require('repl');
var board = new firmata.Board('/dev/ttyAMA0',function(err){
//arduino is ready to communicate
if (err) {
console.log("err:" + err);
return;
}
console.log("Firmata Firing LEDs");
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 December 19, 2018 09:05
chrome serial port implementation for node serialport
/*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;
@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
@joshuaclayton
joshuaclayton / gist:721214
Created November 30, 2010 05:36
Homebrew-installed Python with pyobjc-core and pyobjc
I use Homebrew and wanted to install pip for mercurial. Pip requires a homebrew-installed version of Python, which is fine and dandy; however, I noticed that webkit2png was broken after I installed Python with Homebrew (it was missing pyobjc libs, which comes with the OS X Python install by default).
This assumes that the current homebrewed version of Python is 2.7.1 and that homebrew is set up for /usr/local. If that's not the case, you may have to change the minor version of setuptools (e.g. from 2.7 to 2.8) and change the PATH accordingly.
$ brew install python
Modify your PATH to include the path to Python's bin directory:
export PATH="/usr/local/Cellar/python/2.7.1/bin:/usr/local/bin:$PATH"
@sgk
sgk / patch.ino
Last active April 9, 2017 20:36
Patch Arduino Yun to disable WiFi
#include <Process.h>
void setup() {
Bridge.begin();
Serial.begin(9600);
while (!Serial)
;
Serial.println("Invoking patch script on Yun.");
@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