This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# arpeggiate a given chord, over a given octave range | |
# easily change the root note & scale while it's running | |
# based on robin.newman, https://in-thread.sonic-pi.net/t/force-random-notes-into-a-scale-after-transposing/4493/2 | |
notes = scale(:c3,:major,num_octaves: 3) # list of 22 notes | |
arp = [0,2,4,7,9,11,14,16,18,21] # note values for arpeggiation, 0-indexed | |
live_loop :test do | |
n=rand_i(10) # number of notes in "arp" list; pick one | |
puts n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const matrix = require("@matrix-io/matrix-lite"); | |
const shell = require('shelljs') | |
const nfc = require("@matrix-io/matrix-lite-nfc"); | |
var mode = 0; | |
everLoop(); | |
nfc.read.start({rate:100, info:true}, (code, tag)=>{ | |
if (code === 256){ | |
console.log("Tag Was Scanned"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sonic Pi tutorial: https://sonic-pi.net/tutorial | |
# Gymnopédie No. 1 by Erik Satie – sheet music: https://musopen.org/music/8010-3-gymnopedies/ | |
# Coded by Alex Glow | |
in_thread(name: :bass) do | |
bass_iter = 0 | |
with_fx :reverb, room: 1 do | |
2.times do | |
8.times do | |
#with_fx :echo, mix: 0.4, phase: 0.4 do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AlexBox:~ alex$ sam install assistant -i proj_59lE2amy64B5 | |
Downloading assistant | |
NLU training done | |
ASR training done | |
✔ Deploying assistant to raspberrypi.local... | |
Checking for skills | |
Cloning skill Snips.TimesTables_EN from url: https://github.com/snipsco/snips-skill-times-tables-quiz | |
Cloning into 'snips-skill-times-tables-quiz'... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Martin Kronberg | |
October 2016 | |
npm install johnny-five | |
npm install ble-serial | |
npm install keypress | |
*/ | |
var five = require("johnny-five"), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LEAD SCOUT | |
function startup { run radar, 1000 } | |
function radar { led.green(500); message.group(7) } | |
FIELD SCOUTs | |
function on.message.group { if (arg(1) == 7) { t = 0; led.green(500); } } | |
function counter { if (t == 2) { led.orange }; if (t == 4) { led.red }; t = t+1; } | |
function startup { run counter, 1000 } | |
• Turn on Lead Scout & leave it plugged in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LEAD SCOUT: | |
function startup { run rotate,1000; }; | |
function rotate { r = random(255); g = random(255); b = random(255); color; }; | |
function color { led.setrgb(r,g,b); message.group(1,led.gethex()); }; | |
FIELD SCOUT(S): | |
function on.message.group { key.print(arg(3)); led.sethex(arg(3)); }; | |
// Turn the Lead Scout off, then on again - and make sure the Field Scout is also on. Each will flash its torch color when booting. After a brief pause, the Lead Scout will start turning the torch LED random colors once per second, and broadcast them to the Field Scout, which will mirror them. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The first block of values are with the headset NOT ON MY HEAD -- just to test the data stream. | |
// The second block is with it on my head (there was no extra output in between). Holy crap holy crap holy crap. | |
// It's just: follow the hardware-hack tutorial I'll link elsewhere, upload Eric's sketch with a couple little tweaks, turn on headset! | |
// HEADSET NOT ON HEAD | |
UHello from Pinoccio! | |
(Shell based on Bitlash v2.0 (c) 2014 Bill Roy) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Playing around with my 5050 LED strips (non-individually-addressable 12V light strips). These come with several remotes; my room lights use the smallest one, which looks like this: http://ecx.images-amazon.com/images/I/517%2BZyjWbkL._SY300_.jpg | |
u% ÕN"–∏“¥…Hello from Pinoccio! | |
(Shell based on Bitlash v2.0 (c) 2014 Bill Roy) | |
17488 bytes free | |
Build 2014040301 | |
Field Scout ready |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To find the limits on a new servo ("testing testing"): | |
function tt { timer3.pwm(3, arg(1)); }; | |
tt(whatever) | |
Black micro-servo: 40 / 120 | |
Blue micro-servo: 30 / 115 (it seems to turn backwards from the black one?) | |
Black HS-311: 30 / 125 |
NewerOlder