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
| MAX=1700 | |
| MID=1500 | |
| MIN=1200 | |
| sudo pigpiod | |
| pigs pfs 18 50 # set pwm freq to 50 hz on BCM18 | |
| pigs servo 18 $MID # set servo pulsewidth to MID us on BCM18 | |
| sleep 1 | |
| pigs servo 18 $MIN # set servo pulsewidth to MIN on BCM18 |
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
| // Import Express | |
| var express = require("express"); | |
| var app = express(); | |
| // Import Cors: cross origin resource | |
| var cors = require("cors"); | |
| app.use(cors()); | |
| // Import Mongoose | |
| var mongoose = require("mongoose"); |
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
| // instructions: | |
| // 1.) install node.js and npm | |
| // 2.) put this file in a folder | |
| // 3.) go to this folder in terminal, and install ffi and ref using 'npm install ...' | |
| // 4.) execute by typing `node node-ffi-mapper.js` | |
| // | |
| // note: refers explicitly to libmapper-0.2.dylib so make sure it is on the path! | |
| var ref = require('ref'); | |
| var ffi = require('ffi'); |
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. |
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
| #!/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
| 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
| /** | |
| 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
| 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
| 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")) { |