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 / flow.json
Created October 13, 2018 16:13
hsl quick bot
[{"id":"5B8LAF_kx78","type":"change","z":"4cDfTnOOUyA","name":"forward","rules":[{"t":"set","p":"payload","pt":"msg","to":"[37,1,38,0,39,1,34,0]","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":1230,"y":545,"wires":[[]]},{"id":"Q_y_43OV28I","type":"change","z":"4cDfTnOOUyA","name":"reverse","rules":[{"t":"set","p":"payload","pt":"msg","to":"[37,0,38,1,39,0,34,1]","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":1230,"y":611,"wires":[[]]},{"id":"878sgrEuzGI","type":"change","z":"4cDfTnOOUyA","name":"left","rules":[{"t":"set","p":"payload","pt":"msg","to":"[37,1,38,0,39,0,34,1]","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":1231,"y":672,"wires":[[]]},{"id":"uPJDkhN8cq4","type":"change","z":"4cDfTnOOUyA","name":"right","rules":[{"t":"set","p":"payload","pt":"msg","to":"[39,1,34,0,37,0,38,1]","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":1230,"y":738,"wires":[[]]},{"id":"9zVxYvdVzW8","type":"bluetooth ou
dat://d40cf94435866fafa161c1cf5ac6fbba87c449696ab1c24732f09345a84e0f73
dat://4c82fd97fc845b37da5eef33f83b03979b2cf8a9ab53f83af2b5e3da1c4a783e
music: dat://2c1aebd957f3ee2f4ce0f76af0f09f81ee259fa0b4d4679822eb3b87db56a3b2
dat://28e82c8534a76b40439ce97b7f69bc5bb3c37f6b6a1c4d7c8feb2aebbcf00af1/
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
id="svg3035"
viewBox="0 0 630 630"
height="100%"
@monteslu
monteslu / client.js
Last active August 22, 2018 18:36
ar drone with browser face detection
const socket = io.connect();
const detector = new FaceDetector();
let face;
//deal with raw png data.
socket.on('png', function (packet) {
if(packet.data) {
const dataUrl = 'data:image/png;base64,' + packet.data;
const img = new Image();
@monteslu
monteslu / controls_ble-io.esp32.json
Created May 14, 2018 23:18
finally perfect ble-io controls for esp32 bot
[{"id":"w7289B2H_X4","type":"bluetooth out","z":"UFiUzfL0xVA","name":"digital","characteristicId":"2a56","bleServiceId":"bada5555-e91f-1337-a49b-8675309fb099","x":765,"y":159,"wires":[]},{"id":"IMIdfb8ZRDc","type":"bluetooth out","z":"UFiUzfL0xVA","name":"analog","characteristicId":"2a58","bleServiceId":"bada5555-e91f-1337-a49b-8675309fb099","x":777,"y":423,"wires":[]},{"id":"XLiyeeZNfHg","type":"iot buttons","z":"UFiUzfL0xVA","x":79.5,"y":38,"wires":[["ZpGYRy-6SjU"]]},{"id":"ZpGYRy-6SjU","type":"switch","z":"UFiUzfL0xVA","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"2","vt":"num"},{"t":"eq","v":"10","vt":"num"},{"t":"eq","v":"5","vt":"num"},{"t":"eq","v":"7","vt":"num"},{"t":"eq","v":"6","vt":"num"},{"t":"eq","v":"4","vt":"num"},{"t":"eq","v":"8","vt":"num"},{"t":"eq","v":"1","vt":"str"}],"checkall":"true","outputs":8,"x":157,"y":270,"wires":[["3G19J9pm8kg"],["Vy_DQgVO6Tg"],["ABJ-PXjp8L8"],["s1Vjl8NOHVM"],["in0eScdUR_o"],["m3dKjykASr8"],["tVJtHjltcWw"],[]]},{"id":"in0eScdUR_o","
[{"id":"w7289B2H_X4","type":"bluetooth out","z":"UFiUzfL0xVA","name":"digital","characteristicId":"2a56","bleServiceId":"bada5555-e91f-1337-a49b-8675309fb099","x":833,"y":201,"wires":[]},{"id":"IMIdfb8ZRDc","type":"bluetooth out","z":"UFiUzfL0xVA","name":"analog","characteristicId":"2a58","bleServiceId":"bada5555-e91f-1337-a49b-8675309fb099","x":653,"y":414,"wires":[]},{"id":"XLiyeeZNfHg","type":"iot buttons","z":"UFiUzfL0xVA","x":63.5,"y":55,"wires":[["ZpGYRy-6SjU"]]},{"id":"ZpGYRy-6SjU","type":"switch","z":"UFiUzfL0xVA","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"2","vt":"num"},{"t":"eq","v":"10","vt":"num"},{"t":"eq","v":"5","vt":"num"},{"t":"eq","v":"7","vt":"num"},{"t":"eq","v":"6","vt":"num"},{"t":"eq","v":"4","vt":"num"},{"t":"eq","v":"8","vt":"num"},{"t":"eq","v":"1","vt":"str"}],"checkall":"true","outputs":8,"x":139,"y":245,"wires":[["3G19J9pm8kg"],["Vy_DQgVO6Tg"],["ABJ-PXjp8L8"],["s1Vjl8NOHVM"],["in0eScdUR_o"],["m3dKjykASr8"],["tVJtHjltcWw"],[]]},{"id":"in0eScdUR_o","
[{"id":"w7289B2H_X4","type":"bluetooth out","z":"UFiUzfL0xVA","name":"digital","characteristicId":"2a56","bleServiceId":"bada5555-e91f-1337-a49b-8675309fb099","x":812,"y":265,"wires":[]},{"id":"IMIdfb8ZRDc","type":"bluetooth out","z":"UFiUzfL0xVA","name":"analog","characteristicId":"2a58","bleServiceId":"bada5555-e91f-1337-a49b-8675309fb099","x":653,"y":414,"wires":[]},{"id":"XLiyeeZNfHg","type":"iot buttons","z":"UFiUzfL0xVA","x":63.5,"y":55,"wires":[["ZpGYRy-6SjU"]]},{"id":"ZpGYRy-6SjU","type":"switch","z":"UFiUzfL0xVA","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"2","vt":"num"},{"t":"eq","v":"10","vt":"num"},{"t":"eq","v":"5","vt":"num"},{"t":"eq","v":"7","vt":"num"},{"t":"eq","v":"6","vt":"num"},{"t":"eq","v":"4","vt":"num"},{"t":"eq","v":"8","vt":"num"},{"t":"eq","v":"1","vt":"str"}],"checkall":"true","outputs":8,"x":139,"y":245,"wires":[["3G19J9pm8kg"],["Vy_DQgVO6Tg"],["ABJ-PXjp8L8"],["s1Vjl8NOHVM"],["in0eScdUR_o"],["m3dKjykASr8"],["tVJtHjltcWw"],[]]},{"id":"in0eScdUR_o","
[{"id":"cBef6VcF_Ws","type":"bluetooth out","z":"rAuvw31rhPg","name":"digital","characteristicId":"2a56","bleServiceId":"bada5555-e91f-1337-a49b-8675309fb099","x":780,"y":257,"wires":[]},{"id":"EFQOBN3SDyA","type":"bluetooth out","z":"rAuvw31rhPg","name":"analog","characteristicId":"2a58","bleServiceId":"bada5555-e91f-1337-a49b-8675309fb099","x":783,"y":420,"wires":[]},{"id":"iiFCoxm56FE","type":"iot buttons","z":"rAuvw31rhPg","x":80,"y":36,"wires":[["zESap7UaIGA"]]},{"id":"zESap7UaIGA","type":"switch","z":"rAuvw31rhPg","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"2","vt":"num"},{"t":"eq","v":"10","vt":"num"},{"t":"eq","v":"5","vt":"num"},{"t":"eq","v":"7","vt":"num"},{"t":"eq","v":"6","vt":"num"},{"t":"eq","v":"4","vt":"num"},{"t":"eq","v":"8","vt":"num"},{"t":"eq","v":"1","vt":"str"}],"checkall":"true","outputs":8,"x":117,"y":155,"wires":[["bUXDfKVQEnw","n9W61kiVlQ4"],["XXbmUh8NOdE","KTc2-f2BYxk"],["bUXDfKVQEnw","KTc2-f2BYxk"],["n9W61kiVlQ4","XXbmUh8NOdE"],["MWaVGp2fwpw"],["RO
@monteslu
monteslu / nodebot_gamepad.json
Created April 17, 2018 16:32
esp 32 nodebot and gamepad control
[{"id":"cBef6VcF_Ws","type":"bluetooth out","z":"rAuvw31rhPg","name":"digital","characteristicId":"2a56","bleServiceId":"bada5555-e91f-1337-a49b-8675309fb099","x":780,"y":257,"wires":[]},{"id":"EFQOBN3SDyA","type":"bluetooth out","z":"rAuvw31rhPg","name":"analog","characteristicId":"2a58","bleServiceId":"bada5555-e91f-1337-a49b-8675309fb099","x":783,"y":420,"wires":[]},{"id":"iiFCoxm56FE","type":"iot buttons","z":"rAuvw31rhPg","x":80,"y":36,"wires":[["zESap7UaIGA"]]},{"id":"zESap7UaIGA","type":"switch","z":"rAuvw31rhPg","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"2","vt":"num"},{"t":"eq","v":"10","vt":"num"},{"t":"eq","v":"5","vt":"num"},{"t":"eq","v":"7","vt":"num"},{"t":"eq","v":"6","vt":"num"},{"t":"eq","v":"4","vt":"num"},{"t":"eq","v":"8","vt":"num"},{"t":"eq","v":"1","vt":"str"}],"checkall":"true","outputs":8,"x":117,"y":155,"wires":[["bUXDfKVQEnw","n9W61kiVlQ4"],["XXbmUh8NOdE","KTc2-f2BYxk"],["bUXDfKVQEnw","KTc2-f2BYxk"],["n9W61kiVlQ4","XXbmUh8NOdE"],["MWaVGp2fwpw"],["RO
@monteslu
monteslu / lolin32.json
Created April 16, 2018 19:28
nodebot using pins 4,16,17 & 18, 23, 19
[{"id":"cBef6VcF_Ws","type":"bluetooth out","z":"rAuvw31rhPg","name":"digital","characteristicId":"2a56","bleServiceId":"bada5555-e91f-1337-a49b-8675309fb099","x":726,"y":272,"wires":[]},{"id":"EFQOBN3SDyA","type":"bluetooth out","z":"rAuvw31rhPg","name":"analog","characteristicId":"2a58","bleServiceId":"bada5555-e91f-1337-a49b-8675309fb099","x":650,"y":459,"wires":[]},{"id":"iiFCoxm56FE","type":"iot buttons","z":"rAuvw31rhPg","x":98,"y":166,"wires":[["zESap7UaIGA"]]},{"id":"zESap7UaIGA","type":"switch","z":"rAuvw31rhPg","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"2","vt":"num"},{"t":"eq","v":"10","vt":"num"},{"t":"eq","v":"5","vt":"num"},{"t":"eq","v":"7","vt":"num"},{"t":"eq","v":"6","vt":"num"},{"t":"eq","v":"4","vt":"num"},{"t":"eq","v":"8","vt":"num"},{"t":"eq","v":"1","vt":"str"}],"checkall":"true","outputs":8,"x":160,"y":335,"wires":[["bUXDfKVQEnw","n9W61kiVlQ4"],["XXbmUh8NOdE","KTc2-f2BYxk"],["bUXDfKVQEnw","KTc2-f2BYxk"],["n9W61kiVlQ4","XXbmUh8NOdE"],["MWaVGp2fwpw"],["R