Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env ruby
# Made by Pieter de Bie <frimmirf@gmail.com>
# Based on a "Pastie" task by someone
require "tempfile"
GIST_URL = 'http://gist.github.com/gists'
GIST_LOGIN_URL = 'https://gist.github.com/session'
USERNAME = "pieter"
TOKEN = "SweetTokenPower"
wget https://raw.github.com/gkaindl/beaglebone-ubuntu-scripts/master/bb-get-rcn-kernel-source.sh
chmod +x bb-get-rcn-kernel-source.sh
./bb-get-rcn-kernel-source.sh
@deepakkarki
deepakkarki / pru_api.py
Created June 10, 2014 17:19
1st iteration of the PRU Speak API
import pru_speak
botspeak_code = \
''' SET DIO[0] , 1
WAIT 1
SET DIO[0], 0
WAIT 1
GOTO 0'''
pru_speak.load(botspeak_code)
@DiegoTc
DiegoTc / CARD_1_IN_1.html
Last active August 29, 2015 14:02
Bone101 Tutorial
<p><span style="font-family: 'Gotham SSm A', 'Gotham SSm B'; font-size: 30px; line-height: 30px;">Overview</span><span style="font-family: 'Gotham SSm A', 'Gotham SSm B';"><br></span></p><p><span style="font-family: 'Gotham SSm A', 'Gotham SSm B';">In this tutorial, you will learn how to control an external LED using a BeagleBone Black (BBB) using Bonescript.</span><br></p><p><span style="font-family: 'Gotham SSm A', 'Gotham SSm B';"><img src="https://learn.adafruit.com/system/assets/assets/000/009/102/medium800/beaglebone_overview.jpg?1396883186" style="width: 204px;"><br></span></p><p><span style="font-family: 'Gotham SSm A', 'Gotham SSm B';"><br></span></p>

SET

CMD   A     VALA     B     VALB  
0000 0000 0000 0000 0000 0000 0000 0000
\  / \  / \       / \  / \       / \  / 
SET  DIO      5     VAR      4   ignored
  • A,B are one of DIO, AO, PWM, TMR, user variable, value
/*instruction set encoding */
#define NOP 0
/*SET RES[x], y - IO operations*/
#define SET_DIO_a 1
#define SET_DIO_b 2
#define SET_DIO_c 3
#define SET_PWM_a 4
#define SET_PWM_b 5
#define SET_PWM_c 6
#!/bin/bash
export LC_ALL="C"
dpkg-reconfigure locales
locale-gen
var b = require('bonescript');
b.pinMode("P8_12", b.INPUT);
setInterval(check,100);
function check() {
b.digitalRead(pin, checkButton);
}
function checkButton(x) {
if (x.value == 1) {
@vmayoral
vmayoral / gist:6133dc869ebe37a00aec
Created January 29, 2015 14:58
ROS in the BBB (Snappy)
root@localhost:/home/ubuntu/ros-tutorials# ./build.sh
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version.
wget is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 29 not upgraded.
deb http://packages.ros.org/ros/ubuntu vivid main
--2015-01-29 14:41:29-- https://raw.githubusercontent.com/ros/rosdistro/master/ros.key
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 23.235.43.133
@jadonk
jadonk / Makefile
Created February 18, 2015 23:57
How to build a PRU binary using libstarterware.a
CC := clpru
LD := lnkpru
HEXBIN := hexpru
SWDIR = /usr/share/pru_am335x_starterware
CGTDIR = /usr/share/ti/cgt-pru
INCLUDEDIR = -I$(SWDIR)/include -I$(SWDIR)/include/hw -I$(SWDIR)/include/pru -I$(CGTDIR)/include
LIBDIR = -i$(SWDIR)/lib -i$(CGTDIR)/lib