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
#!/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 |
import pru_speak | |
botspeak_code = \ | |
''' SET DIO[0] , 1 | |
WAIT 1 | |
SET DIO[0], 0 | |
WAIT 1 | |
GOTO 0''' | |
pru_speak.load(botspeak_code) |
<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> |
/*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) { |
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 |
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 |