Skip to content

Instantly share code, notes, and snippets.

jadonk / qb_showain.html
Created Feb 18, 2014
Quickly read the AIN values on BeagleBone Black for debugging the Quickbot ( To install, open Cloud9 IDE on your board (http://<bot's IP address>:3000), create a new file and paste this content, then click the PREVIEW button.
View qb_showain.html
<!-- Quickbot testing -->
<title>Quickbot testing</title>
<script src=""></script>
<script src=""></script>
<h1>jQuery Demo</h1>
<p>AIN0 = <span id="ain0"></span></p>
pactl load-module module-loopback
while true
DISPLAY=:0 chrt -f 50 /usr/games/pycdg "`ls /root/karaoke/*.cdg | shuf -n 1`"
View fiddle.html
<h1>BoneScript Flot Demo</h1>
<div id="myplot" style="width:500px;height:300px;"></div>
<p><a href="">fork me on github</a></p>
View jsbin.uderuw.html
<script src=""></script>
<script src=""></script>
<body onload="WaveDrom.ProcessAll()">
<h2>WaveDrom Example</h2>
WaveDrom timing diagrams can be embedded into the web pages, blogs, wiki pages:
View output.txt
root@beaglebone:~/bonescript# node test-dbus-native-wicd.js
onGetConnectionStatus: {"0":null,"1":[2,["","XXXXX\" Nickname:\"MT7601STA","92","-1","65 Mb/s"]]}
onGetNumberOfNetworks: {"0":null,"1":11}
# On BeagleBone Black running Debian (
# * apt-get install pykaraoke
# * Load a bunch of .cdg/.mp3 files
# * Run this script
#pactl load-module module-loopback || echo "No microphone found or pulseaudio not running" && exit
#alsaloop -C hw:1,0 -P plughw:0,0 --channels=1 --tlatency=10000 --daemonize
#setterm -blank 0
#setterm -powerdown 0
while true
View dcmotor.js
var b = require('bonescript');
var MOTOR = 'P9_16';
var FORWARD = 'P9_18';
var BACKWARD = 'P9_22';
var POT = 'P9_36';
var BUTTON = 'P8_19'
var speed = 0;
var increment = 0.01;
var direction = 1;
View servo.js
var b = require('bonescript');
var SERVO = 'P9_14';
var duty_min = 0.03;
var position = 0;
var increment = 0.01;
var scale = 0.090;
//b.pinMode(SERVO, b.OUTPUT);
View cylon-servo.js
var Cylon = require('cylon-beaglebone/node_modules/cylon');
connection: {name: 'beaglebone', adaptor: 'beaglebone'},
device: {name: 'servo', driver: 'servo', pin: 'P9_14'},
work: function(my) {
var angle = 45 ;