Skip to content

Instantly share code, notes, and snippets.

View soundanalogous's full-sized avatar

Jeff Hoefs soundanalogous

  • San Francisco, CA
View GitHub Profile
@soundanalogous
soundanalogous / ble-nano-test.js
Last active September 4, 2017 23:33
StandardFirmataBLE test for RedBearLab BLE Nano
/*
* NOTE: This will not run without modification until this issue is resolved:
* https://github.com/RedBearLab/nRF51822-Arduino/pull/97.
*
* Until then, you will need to patch the RedBearLab nRF51822-Arduino core
* library by following these instructions:
* 1. Install v1.0.7 of the RedBear nRF51822 Boards package using the Arduino
* Boards Manager (Tools > Boards > Boards Manager...). If you have a newer
* version already installed, first downgrade to v1.0.7.
* 2. Clone https://github.com/soundanalogous/nRF51822-Arduino and checkout the
@soundanalogous
soundanalogous / hw-serial-gps.js
Created February 11, 2016 05:04
Test firmata hardware serial
var Board = require("firmata");
Board.requestPort(function(error, port) {
if (error) {
console.log(error);
return;
}
var board = new Board(port.comName);
board.on("ready", function() {
@soundanalogous
soundanalogous / ble-j5-test.js
Last active August 23, 2018 19:31
johnny-five example for StandardFirmataBLE and Arduino 101
/*
* To run, install the following modules:
* npm install ble-serial
* npm install johnny-five
*
* wiring:
* button to pin D2
* button to pin A2
* LED to pin D10
* potentiometer to pin A0
@soundanalogous
soundanalogous / ble-firmata-test.js
Last active December 30, 2016 17:24
node.js example for StandardFirmataBLE with Arduino 101
/*
* Make sure the Intel Curie Boards by Intel board package version 1.0.6 or higher is installed
* via the Arduino Boards Manager
*
* Compile and upload StandardFirmataBLE from the firmata/arduino master branch.
*
* To run, install the following modules:
* npm install ble-serial
* npm install firmata
*
@soundanalogous
soundanalogous / wifi-test.js
Last active March 26, 2016 03:00
simple example to test StandardFirmataWiFi (wire an LED to pin D8 and a potentiometer to pin A0)
/*
* Tested using node v0.12.7
* npm install etherport-client
* npm install firmata
*
* To run in Debug mode:
* DEBUG=etherport-client node wifi-test
*/
var Firmata = require("firmata").Board;
var EtherPortClient = require("etherport-client").EtherPortClient;
@soundanalogous
soundanalogous / serialHW.js
Created November 3, 2015 06:43
example of connecting to a serial device using BreakoutJS
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>Serial</title>
<!-- The following (socket.io.js) is only required when using the node_server -->
@soundanalogous
soundanalogous / unsigned-apk.md
Last active October 29, 2015 22:54
creating unsigned apk from Processing Android mode
  1. From the Processing menu, select: File > Export Android Project
  2. From your shell (Terminal), navigate to your the android directory that was created in the project folder
  3. Run: ant release
  4. Sign the build. From the android directory run: jarsigner -verbose -keystore ~/.android/debug.keystore -storepass android -keypass android bin/YOUR_APP_NAME.apk androiddebugkey
@soundanalogous
soundanalogous / ConfigurableFirmataYun.ino
Created June 24, 2015 03:23
ConfigurableFirmata for Arduino Yun
/*
Firmata is a generic protocol for communicating with microcontrollers
from software on a host computer. It is intended to work with
any host computer software package.
To download a host software package, please clink on the following link
to open the download page in your default browser.
https://github.com/firmata/ConfigurableFirmata#firmata-client-libraries
Copyright (C) 2006-2008 Hans-Christoph Steiner. All rights reserved.
Copyright (C) 2010-2011 Paul Stoffregen. All rights reserved.
Copyright (C) 2009 Shigeru Kobayashi. All rights reserved.
@soundanalogous
soundanalogous / FirmataSerialTest.ino
Last active April 2, 2020 18:53
Firmata Serial protocol device emulator
/*
* Emulate a simple serial device in order to test the Firmata Serial protocol.
* Connect the rxPin to the TX pin of the configured port of the board running StandardFirmata
* Connect the txPin to the RX pin of the configured port of the board running StandardFirmata
*
* Use Serial to read and write to the board running StandardFirmata
* Use SoftwareSerial to write data to a console to test SERIAL_WRITE
*/
#include <SoftwareSerial.h>
@soundanalogous
soundanalogous / NetworkFirmata.ino
Last active August 29, 2015 14:15
StandardFirmata features + Stepper motor + Ethernet
/*
* Firmata is a generic protocol for communicating with microcontrollers
* from software on a host computer. It is intended to work with
* any host computer software package.
*/
/*
Copyright (C) 2006-2008 Hans-Christoph Steiner. All rights reserved.
Copyright (C) 2010-2011 Paul Stoffregen. All rights reserved.
Copyright (C) 2009 Shigeru Kobayashi. All rights reserved.