├── .gitignore ├── package.json ├── e131.js ├── e131-momentum.js ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | 6 | # Runtime data 7 | pids 8 | *.pid 9 | *.seed 10 | 11 | # Directory for instrumented libs generated by jscoverage/JSCover 12 | lib-cov 13 | 14 | # Coverage directory used by tools like istanbul 15 | coverage 16 | 17 | # nyc test coverage 18 | .nyc_output 19 | 20 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 21 | .grunt 22 | 23 | # node-waf configuration 24 | .lock-wscript 25 | 26 | # Compiled binary addons (http://nodejs.org/api/addons.html) 27 | build/Release 28 | 29 | # Dependency directories 30 | node_modules 31 | jspm_packages 32 | 33 | # Optional npm cache directory 34 | .npm 35 | 36 | # Optional REPL history 37 | .node_repl_history 38 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "momentum", 3 | "version": "1.0.0", 4 | "description": "just control our window lights", 5 | "main": "index.js", 6 | "scripts": { 7 | "rgb-e131": "nodemon e131.js", 8 | "test": "echo \"Error: no test specified\" && exit 1" 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "git+https://github.com/Progressbar/momentum.git" 13 | }, 14 | "keywords": [ 15 | "progressbar", 16 | "lights" 17 | ], 18 | "author": "matej @yangwao nemcek", 19 | "license": "MIT", 20 | "bugs": { 21 | "url": "https://github.com/Progressbar/momentum/issues" 22 | }, 23 | "homepage": "https://github.com/Progressbar/momentum#readme", 24 | "dependencies": { 25 | "canvas": "^1.6.10", 26 | "canvastoe131": "0.0.3", 27 | "e131": "^1.1.1" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /e131.js: -------------------------------------------------------------------------------- 1 | let e131 = require('e131'); 2 | 3 | // controling rgb matrix 4 | let client = new e131.Client('192.168.223.6'); // or use a universe 5 | let packet = client.createPacket(192); // we want 8 RGB (x3) slots 6 | let slotsData = packet.getSlotsData(); 7 | packet.setSourceName('test E1.31 client'); 8 | packet.setUniverse(0x01); // make universe number consistent with the client 9 | packet.setOption(packet.Options.PREVIEW, true); // don't really change any fixture 10 | packet.setPriority(packet.DEFAULT_PRIORITY); // not strictly needed, done automatically 11 | 12 | // slotsData is a Buffer view, you can use it directly 13 | let color = 0; 14 | function cycleColor() { 15 | for (let idx=0; idx Our soon to be 3x14 LED-bar [-+> ] in 7 [windows](https://goo.gl/photos/VLsqS14gzdyxJ2pZ7) of Progressbar at Michalska 3, Bratislava, Slovakia 3 | 4 | ## Features 5 | Mood/Ambient lamp in windows of Progressbar hackerspace 6 | * (FIXME) need API 7 | 8 | ## Documentation 9 | 10 | we are using e1.31 protocol, so far testing unit is at universe 2 11 | 12 | $ brew install pkg-config cairo libpng jpeg giflib 13 | 14 | ## Libs 15 | 16 | https://github.com/bbx10/espopc 17 | 18 | https://github.com/bbx10/node-opc-server 19 | 20 | ## Hardware Requirements (One Window) 21 | * [Pimorini - 18-channel-8-bit-pwm-led-driver-w-i2c-interface](https://shop.pimoroni.com/products/18-channel-8-bit-pwm-led-driver-w-i2c-interface) 22 | * ~ 6GBP 23 | * Limitation? > Up to 34mA per channel constant current sinking (adjustable) 24 | * buylinkhere 25 | * ESP8266 26 | * ~ 3GBP 27 | * which version? w/ i2c channel 28 | * buylinkhere 29 | * ~27 RGB LEDs one pixel * 6 ≈ 162 RGB LEDs 30 | * 5050 300leds waterproof 15M 31 | * 20.90GBP 32 | * http://www.ebay.co.uk/itm/222249833184?var=521085592998 33 | * 6 PNP transistors 34 | * Power source 12V 35 | * price? 36 | * buylinkhere 37 | 38 | --------------------------------------------------------------------------------