Skip to content

Instantly share code, notes, and snippets.

View monteslu's full-sized avatar
:shipit:
crushing all the code. Mostly into reusable modules, tho

Luis Montes monteslu

:shipit:
crushing all the code. Mostly into reusable modules, tho
View GitHub Profile
@monteslu
monteslu / carcontrol.json
Created June 23, 2017 17:30
car control
[{"id":"6hhqqI1I-Ls","type":"bluetooth out","z":"49fb777.a30e588","name":"digital..","characteristicId":"2a56","bleServiceId":"bada5555-e91f-1337-a49b-8675309fb099","x":821.5,"y":222,"wires":[]},{"id":"dd6R088sIXc","type":"bluetooth out","z":"49fb777.a30e588","name":"analog..","characteristicId":"2a58","bleServiceId":"bada5555-e91f-1337-a49b-8675309fb099","x":707.5,"y":655,"wires":[]},{"id":"kkgJpERfIvw","type":"iot buttons","z":"49fb777.a30e588","x":87.5,"y":180,"wires":[["vKL1gU1CZ18"]]},{"id":"vKL1gU1CZ18","type":"switch","z":"49fb777.a30e588","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"3","vt":"num"},{"t":"eq","v":"4","vt":"num"},{"t":"eq","v":"2","vt":"num"},{"t":"eq","v":"6","vt":"num"},{"t":"eq","v":"5","vt":"num"},{"t":"eq","v":"7","vt":"num"},{"t":"eq","v":"8","vt":"num"},{"t":"eq","v":"1","vt":"str"}],"checkall":"true","outputs":8,"x":149.5,"y":349,"wires":[["17AfuHvqwJM","QGG7QoVH8lo"],["qTXb5mvCQPU","qApozIfAPgs"],["17AfuHvqwJM","qApozIfAPgs"],["QGG7QoVH8lo","qTXb5m
[{"id":"2pGxMM2FsGc","type":"bluetooth out","z":"49fb777.a30e588","name":"curie","characteristicId":"2a5b","bleServiceId":"bada5555-e91f-1337-a49b-8675309fb099","x":1257,"y":1212,"wires":[]},{"id":"aeTomPptGpo","type":"inject","z":"49fb777.a30e588","name":"red strip","topic":"","payload":"[4,12,255,0,0]","payloadType":"json","repeat":"","crontab":"","once":false,"allowDebugInput":false,"x":818,"y":1079,"wires":[["2pGxMM2FsGc"]]},{"id":"SQgYsSlZ0KA","type":"inject","z":"49fb777.a30e588","name":"black strip","topic":"","payload":"[4,12, 0,0,0]","payloadType":"json","repeat":"","crontab":"","once":false,"allowDebugInput":false,"x":793,"y":1137,"wires":[["2pGxMM2FsGc"]]},{"id":"cW911aALG6U","type":"inject","z":"49fb777.a30e588","name":"pixel 2 blue","topic":"","payload":"[3,12,2, 0,0,200]","payloadType":"json","repeat":"","crontab":"","once":false,"allowDebugInput":false,"x":810,"y":1197,"wires":[["2pGxMM2FsGc"]]},{"id":"me48DP6hmIo","type":"inject","z":"49fb777.a30e588","name":"pixel 0 - 3 first half rainbow","t
@monteslu
monteslu / face.json
Created August 3, 2017 01:36
face detection
[{"id":"h7jqQtSMQmU","type":"debug","z":"_alOBB8I5gw","name":"","active":true,"console":"false","complete":"results","x":500,"y":414,"wires":[]},{"id":"ywxCRTJ1Je4","type":"inject","z":"_alOBB8I5gw","name":"","topic":"","payload":"","payloadType":"date","repeat":"1","crontab":"","once":false,"allowDebugInput":false,"x":222,"y":146,"wires":[["xvq1gtW7UxQ"]]},{"id":"xvq1gtW7UxQ","type":"camera","z":"_alOBB8I5gw","name":"","animated":false,"x":209,"y":225,"wires":[["Oo8A3qMSxUA"]]},{"id":"Oo8A3qMSxUA","type":"shape","z":"_alOBB8I5gw","name":"","shapeType":"face","x":179,"y":300,"wires":[["98wVEP9htq0"]]},{"id":"98wVEP9htq0","type":"switch","z":"_alOBB8I5gw","name":"","property":"results.length","propertyType":"msg","rules":[{"t":"gt","v":"0","vt":"num"}],"checkall":"true","outputs":1,"x":401,"y":289,"wires":[["lEtqee3oBi8"]]},{"id":"lEtqee3oBi8","type":"change","z":"_alOBB8I5gw","name":"","rules":[{"t":"set","p":"left","pt":"msg","to":"results[0].boundingBox.left","tot":"msg"},{"t":"set","p":"top","pt":"msg","to
@monteslu
monteslu / webusb_pixel.ino
Created September 20, 2017 23:02
webusb + neopixels
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
#endif
#define PIN 6
// Parameter 1 = number of pixels in strip
// Parameter 2 = Arduino pin number (most are valid)
@monteslu
monteslu / webusb.json
Created October 10, 2017 00:31
web usb sumbot
[{"id":"U2iP2JBwrmw","type":"nodebot","z":"18QoD_1O8Fo","name":"","username":"","password":"","boardType":"firmata","serialportName":"/dev/cu.usbmodem1411","connectionType":"webusb-serial","mqttServer":"","socketServer":"","pubTopic":"","subTopic":"","tcpHost":"","tcpPort":"","sparkId":"","sparkToken":"","beanId":"","impId":"","meshbluServer":"https://meshblu.octoblu.com","uuid":"","token":"","sendUuid":""},{"id":"z97ErFY3XNM","type":"servo","z":"18QoD_1O8Fo","name":"","pin":"5","upperRange":"","lowerRange":"","mode":"standard","controller":"","board":"U2iP2JBwrmw","x":848,"y":377,"wires":[]},{"id":"5Tk4jy-N8es","type":"servo","z":"18QoD_1O8Fo","name":"","pin":"6","upperRange":"","lowerRange":"","mode":"standard","controller":"","board":"U2iP2JBwrmw","x":860,"y":641,"wires":[]},{"id":"j7Lqig4sPXE","type":"iot buttons","z":"18QoD_1O8Fo","x":330,"y":161,"wires":[["aV0_vlDWpOI"]]},{"id":"MAtE6AVwzpg","type":"change","z":"18QoD_1O8Fo","name":"0","rules":[{"t":"set","p":"payload","pt":"msg","to":"0","tot":"num"}],
@monteslu
monteslu / sumobot.json
Created October 24, 2017 07:26
working usb sumobot
[{"id":"U2iP2JBwrmw","type":"nodebot","z":"18QoD_1O8Fo","name":"","username":"","password":"","boardType":"firmata","serialportName":"/dev/tty.usbmodem1411","connectionType":"webusb-serial","mqttServer":"","socketServer":"","pubTopic":"","subTopic":"","tcpHost":"","tcpPort":"","sparkId":"","sparkToken":"","beanId":"","impId":"","meshbluServer":"https://meshblu.octoblu.com","uuid":"","token":"","sendUuid":""},{"id":"5ynM3zAzVQY","type":"iot sliders","z":"18QoD_1O8Fo","x":275,"y":598,"wires":[["DVfu3IX6TP8"]]},{"id":"DVfu3IX6TP8","type":"math","z":"18QoD_1O8Fo","name":"","operator":"*","operand":"1.8","operandType":"num","payloadProp":"payload","resultProp":"payload","payloadPropType":"msg","resultPropType":"msg","x":368,"y":673,"wires":[["i0sS9n3r1FY"]]},{"id":"i0sS9n3r1FY","type":"switch","z":"18QoD_1O8Fo","name":"","property":"slider","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"2","vt":"num"}],"checkall":"true","outputs":2,"x":492,"y":728,"wires":[["z97ErFY3XNM"],["5Tk4jy-N8es"
@monteslu
monteslu / flow.json
Created November 8, 2017 21:39
Nordic thingy 52 pagenodes flow
[{"id":"0Z0wT-aYM1Q","type":"bluetooth in","z":"u8CV4kEJw0w","name":"","characteristicId":"ef6801079b3549339b1052ffa9740042a","bleServiceId":"EF680100-9B35-4933-9B10-52FFA9740042","x":712,"y":652,"wires":[[]]},{"id":"ouzHq-AIBwo","type":"bluetooth in","z":"u8CV4kEJw0w","name":"","characteristicId":"ef6803029b3549339b1052ffa9740042","bleServiceId":"EF680300-9B35-4933-9B10-52FFA9740042","x":85,"y":64,"wires":[["at7qIN8guz8"]]},{"id":"KaqS7ZvEOE4","type":"bluetooth in","z":"u8CV4kEJw0w","name":"","characteristicId":"ef6804069b3549339b1052ffa9740042","bleServiceId":"EF680400-9B35-4933-9B10-52FFA9740042","x":69,"y":175,"wires":[["KPYZDFD--ec"]]},{"id":"xpQooI6s0yc","type":"debug","z":"u8CV4kEJw0w","name":"","active":true,"console":"false","complete":"payload","x":439,"y":181,"wires":[]},{"id":"KPYZDFD--ec","type":"change","z":"u8CV4kEJw0w","name":"","rules":[{"t":"set","p":"buf[0]","pt":"msg","to":"1","tot":"num"},{"t":"set","p":"buf[1]","pt":"msg","to":"payload[1]","tot":"msg"},{"t":"set","p":"buf[2]","pt":"msg",
[{"id":"8p8NVjR2ke4","type":"inject","z":"ljSsmWJZJmQ","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"allowDebugInput":true,"x":181,"y":104,"wires":[["I9DZVoXhMRA"]]},{"id":"I9DZVoXhMRA","type":"bluetooth out","z":"ljSsmWJZJmQ","name":"","characteristicId":"beb5483e-36e1-4688-b7f5-ea07361b26a8","bleServiceId":"4fafc201-1fb5-459e-8fcc-c5c9c331914b","x":396,"y":498,"wires":[]}]
@monteslu
monteslu / CoolComponent.js
Created January 10, 2018 23:10
stupid hack
import React from 'react';
import { connect } from 'react-redux';
import { show, hide } from '../state/menu';
class CoolComponent extends React.Component {
addActions ( actions ) {
@monteslu
monteslu / clienta.js
Last active January 16, 2018 15:52
rawrer
const mqtt = require('mqtt');
const createRpc = require('./rpc');
const subTopic = 'clienta';
const pubTopic = 'clientb';
const conn = mqtt.connect();
conn.on('connect', function (a) {