Skip to content

Instantly share code, notes, and snippets.

View deadprogram's full-sized avatar
💭
Currently available for work. Let me know how I can help you!

Ron Evans deadprogram

💭
Currently available for work. Let me know how I can help you!
View GitHub Profile
$ DEBUG=* node node_modules/noble/examples/peripheral-explorer.js 207377654321 > wiced-debug.log
hci setting filter to: 1400000020c10000000000400000 +0ms
hci set event mask - writing: 01010c08fffffbff07f8bf3d +3ms
hci set le event mask - writing: 010120081f00000000000000 +1ms
hci read local version - writing: 01011000 +0ms
hci write LE host supported - writing: 016d0c020100 +0ms
hci read LE host supported - writing: 016c0c00 +1ms
hci read bd addr - writing: 01091000 +0ms
hci onSocketData: 040e0401010c00 +1ms
hci event type = 4 +0ms
"use strict";
var Cylon = require("cylon");
Cylon.robot({
connections: {
leap: { adaptor: "leapmotion" },
arduino: { adaptor: "firmata", port: "/dev/tty.usbmodem1411" }
},
root@cylon13:~/mraa/build# make
[ 28%] Built target mraa
[ 30%] Building CXX object src/javascript/CMakeFiles/mraajs.dir/mraajsJAVASCRIPT_wrap.cxx.o
In file included from /usr/local/include/node/node.h:42:0,
from /home/root/mraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:156:
/usr/local/include/node/v8.h:336:1: error: expected unqualified-id before 'using'
using Handle = Local<T>;
^
/usr/local/include/node/v8.h: In constructor 'v8::MaybeLocal<T>::MaybeLocal()':
/usr/local/include/node/v8.h:353:33: error: 'nullptr' was not declared in this scope
Cylon.robot({
connections: {
ollie: { adaptor: "central", uuid: process.env["OLLIE"], module: "cylon-ble" },
ircannon: { adaptor: 'central', uuid: process.env["CANNON"], module: 'cylon-ble' }
},
devices: {
ollie: { driver: "ollie", connection: "ollie", module: "cylon-sphero-ble" },
fire: { driver: 'ble-characteristic',
serviceId: "a495ff20c5b14b44b5121370f02d74de",
characteristicId: "a495ff22c5b14b44b5121370f02d74de",
func (h *MPU6050Driver) initialize() (err error) {
if err = h.connection.I2cStart(mpu6050Address); err != nil {
return
}
// setClockSource
if err = h.connection.I2cWrite(mpu6050Address, []byte{MPU6050_RA_PWR_MGMT_1,
MPU6050_PWR1_CLKSEL_BIT,
MPU6050_PWR1_CLKSEL_LENGTH,
MPU6050_CLOCK_PLL_XGYRO}); err != nil {
@deadprogram
deadprogram / 01-firmata_blink.go
Last active September 4, 2015 03:30 — forked from zankich/01-firmata_blink.go
O'Reilly Gobot Webcast 2015
@deadprogram
deadprogram / bbb_connect.sh
Last active September 4, 2015 03:28 — forked from zankich/bbb_connect.sh
connect to your beaglebone black using the usb->ethernet and forward the internet from your host computer to the beaglebone black
#!/bin/bash
#
# run this script on your linux host computer to connect to the bbb and forward your internet.
# be sure to replace "enp0s20u1" with the appropriate usb device for your bbb, which can be found
# by doing an "ifconfig" on your host computer.
#
sudo -- sh -c 'echo 1 > /proc/sys/net/ipv4/ip_forward'
sudo iptables -A POSTROUTING -t nat -j MASQUERADE
@deadprogram
deadprogram / 01-getting_started.md
Last active September 4, 2015 03:28 — forked from zankich/01-getting_started.md
Gophercon getting started with Gobot

First go to the Gobot Intel Edison Readme (https://github.com/hybridgroup/gobot/tree/master/platforms/intel-iot/edison#how-to-install) and follow the getting started guide. Your Edison has already been updated to the latest firmware version,
so you can skip that part! You will not need to download the Intel XDK, you only need to go through the steps detailing how to connect through the serial interface and then configure your edison.

Find the box called "Base Shield" and open that up and place the grove "Base Shield" onto your Intel Edison. This will allow you to use the Grove connectors shields and cables!

var Cylon = require('cylon');
Cylon.robot({
connections: { bluetooth: {adaptor: 'central', uuid: 'd03972a493da', module: 'cylon-ble'}},
devices: {mip: {driver: 'mip'}},
work: function(my) {
my.mip.setHeadLED(2, 2, 2, 2);
after((2).seconds(), function() {
my.mip.setGameMode(my.mip.Games.Dance);
@deadprogram
deadprogram / temp-sense.js
Created July 11, 2015 22:33
temp-sense.js
var Cylon = require("cylon");
Cylon.robot({
connections: {
edison: { adaptor: "intel-iot" }
},
devices: {
temp: { driver: "upm-grovetemp", pin: 0, connection: "edison" },
servo: { driver: "servo", pin: 9, connection: "edison" },
},