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
@deadprogram
deadprogram / main.go
Created October 12, 2020 16:52 — forked from DazWilkin/main.go
Google Cloud IoT Core & Golang
package main
import (
"crypto/tls"
"crypto/x509"
"flag"
"fmt"
"io/ioutil"
"log"
"time"
@deadprogram
deadprogram / svd-dump.py
Created June 23, 2019 09:59 — forked from devanlai/svd-dump.py
gdb script for dumping STM32 registers
"""
Utilities for dumping STM32 peripheral registers with tab-completion
Based on a script by vampi-the-frog
Dependencies:
pip install -U cmsis-svd
Usage (inside gdb):
(gdb) source /path/to/svd-dump.py
@deadprogram
deadprogram / main.go
Created November 27, 2018 16:18 — forked from nikolaiianchuk/main.go
Fixed memory leaking
package main
import (
"fmt"
"io/ioutil"
"net/http"
"runtime"
"time"
"gocv.io/x/gocv"
@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.api({
host: '0.0.0.0',
port: '7000',
ssl: false
});
Cylon.robot({
name: 'drenerdo',
var Cylon = require('cylon');
Cylon.robot({
connection: { name: 'sphero', adaptor: 'sphero', port: '/dev/tty.Sphero-YBW-RN-SPP' },
device: { name: 'sphero', driver: 'sphero' },
setColor: function(color) {
my.sphero.setColor(color);
},
/*
* 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.
*
* http://firmata.org/wiki/Download
*/

####Installation instructions

  • You will need node.js as well as satisfying the dependencies listed here
  • Once you have the required dependencies met, you can install the required node modules with
    $ npm install cylon cylon-gpio cylon-i2c cylon-firmata cylon-sphero cylon-leapmotion
  • Install the leap motion software (and SDK too if you want, but the SDK is not needed for cylon.js)

####Arduino blink

//blink.js
var Cylon = require('cylon');