This file contains hidden or 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
private Handler handler = new Handler(); | |
//trigger next event. | |
handler.postDelayed(runnable, SAMPLE_INTERVAL_MS); | |
private Runnable runnable = new Runnable() { | |
//this class deals with generating periodic events, | |
// to emulate the incoming "midi messages" from device | |
// at a given rate |
This file contains hidden or 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
// | |
// mapper.c | |
// a maxmsp and puredata external encapsulating the functionality of libmapper | |
// http://www.idmil.org/software/libmapper | |
// Joseph Malloch, IDMIL 2010 | |
// | |
// This software was written in the Input Devices and Music Interaction | |
// Laboratory at McGill University in Montreal, and is copyright those | |
// found in the AUTHORS file. It is licensed under the GNU Lesser Public | |
// General License version 2.1 or later. Please see COPYING for details. |
This file contains hidden or 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
/* | |
This file is part of ttymidi. | |
ttymidi is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 3 of the License, or | |
(at your option) any later version. | |
ttymidi is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
This file contains hidden or 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
int portInIndex = -1; | |
int portOutIndex = -1; | |
// print input ports to console | |
midiIn.listPorts(); // via instance | |
//ofxMidiIn::listPorts(); // via static as well | |
if (midiIn.getNumPorts()) { | |
for (int i=0; i<midiIn.getNumPorts(); i++) { | |
string pname = midiIn.getPortName(i); | |
if (ofStringTimesInString(pname, "ICubeX")) { |
This file contains hidden or 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
gpio load spi | |
while true; | |
do | |
gpio -x mcp3004:200:0 aread 200; #reads first channel of ADC; aread 201 reads 2nd channel, etc. | |
done |
This file contains hidden or 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
/** | |
Custom ESP8266 CLIP sensor for Philips Hue system | |
GPIO2's high/low state will emit two different status values | |
which can then be used to trigger Hue bridge events | |
You will need: | |
0.) Wifi network and Philips Hue bridge connected to it and set up, with an API key | |
1.) A custome IP sensor (CLIP) created in the Hue bridge | |
2.) A rule hooking up the status of the IP sensor and events we want |
This file contains hidden or 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
while true; do | |
echo -n memfree: "`free -m | head -2 | tail -1 | awk '{print $4}'` "; | |
echo -ne swap used: "`cat /proc/swaps | tail -1 | awk '{print $4}'` \r"; | |
sleep 1; | |
done |
This file contains hidden or 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
#!/usr/bin/python | |
#-------------------------------------- | |
# ___ ___ _ ____ | |
# / _ \/ _ \(_) __/__ __ __ | |
# / , _/ ___/ /\ \/ _ \/ // / | |
# /_/|_/_/ /_/___/ .__/\_, / | |
# /_/ /___/ | |
# | |
# lcd_i2c.py | |
# LCD test script using I2C backpack. |
This file contains hidden or 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
[{"id":"8bc3934b.dec0c","type":"mcp3008","z":"bc7ea069.67a99","name":"","device":"/dev/spidev0.0","mode":"0x80","interval":"25","x":319,"y":156,"wires":[["941e2650.e518a8","178087e.871bf78"]]},{"id":"da077c2f.9bf43","type":"inject","z":"bc7ea069.67a99","name":"","topic":"","payload":"start","payloadType":"str","repeat":"","crontab":"","once":true,"x":93,"y":72,"wires":[["8916983b.311a48"]]},{"id":"d1ea8f0e.568af","type":"inject","z":"bc7ea069.67a99","name":"","topic":"","payload":"stop","payloadType":"str","repeat":"","crontab":"","once":false,"x":93.5,"y":37,"wires":[["8916983b.311a48"]]},{"id":"941e2650.e518a8","type":"debug","z":"bc7ea069.67a99","name":"","active":false,"console":"false","complete":"false","x":541,"y":156,"wires":[]},{"id":"178087e.871bf78","type":"ui_slider","z":"bc7ea069.67a99","tab":"e3257868.dcaa18","name":"Push","topic":"","group":"","order":1,"min":0,"max":"1023","x":527,"y":212,"wires":[["f2ec0099.fbb4c"]]},{"id":"b618b17a.ef5bb","type":"ui_gauge","z":"bc7ea069.67a99","tab":"e325786 |
This file contains hidden or 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
[{"id":"c2c6477f.a696e8","type":"midi","z":"29801501.b12f9a","name":"MIDI In","filtermessage":"","port":"1","x":72,"y":42,"wires":[["a8489adb.12f6c8"]]},{"id":"a8489adb.12f6c8","type":"template","z":"29801501.b12f9a","name":"grab midi msg","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{{payload.message}}","x":139,"y":90,"wires":[["6a918548.45b34c"]]},{"id":"6a918548.45b34c","type":"csv","z":"29801501.b12f9a","name":"","sep":",","hdrin":"","hdrout":"","multi":"one","ret":"\\n","temp":"","x":217,"y":41,"wires":[["cc1b3fe4.be9cc","7a9da23f.8e6a2c","fbdad48.cbcff28"]]},{"id":"cc1b3fe4.be9cc","type":"template","z":"29801501.b12f9a","name":"col1","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{{payload.col1}}","x":319,"y":83,"wires":[["b7bcfdb6.33e0f"]]},{"id":"7a9da23f.8e6a2c","type":"template","z":"29801501.b12f9a","name":"col2","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{{payload. |
OlderNewer