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 / loragateway.ino
Created January 24, 2018 08:25
lora gateway esp32
#include <Adafruit_NeoPixel.h>
#include <SPI.h>
#include <LoRa.h>
#include<Arduino.h>
// #include <Wire.h> // Only needed for Arduino 1.6.5 and earlier
#include "SSD1306.h" // alias for `#include "SSD1306Wire.h"`
#define AUTO_PIXEL_PIN 16
#define CONTROL_PIXEL_PIN 16
[{"id":"855cfd8d.e4f6a","type":"nodebot","z":"mDRMOWxAyVw","name":"","username":"","password":"","boardType":"firmata","serialportName":"/dev/tty.wchusbserial1410","connectionType":"local","mqttServer":"","socketServer":"","pubTopic":"","subTopic":"","tcpHost":"","tcpPort":"","sparkId":"","sparkToken":"","beanId":"","impId":"","uuid":"","token":"","sendUuid":""},{"id":"89lsT0wGL1k","type":"iot buttons","z":"mDRMOWxAyVw","x":101.5,"y":38,"wires":[["-MCq9DhpJv4"]]},{"id":"-MCq9DhpJv4","type":"switch","z":"mDRMOWxAyVw","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":215,"y":167,"wires":[["VY0095ih3DE","P41ckv8_bV8","oDewYjp7zcY","BYFka3wRBok"],["mrMV6awnfC8","rU0fe5DpGbw","u8XdGWdZOrs","zQPWi6mtwj8"],["VY0095ih3DE","P41ckv8_bV8"
@monteslu
monteslu / 01hello world
Last active May 21, 2019 00:05
chirpers basic examples
[{"id":"ecRgcC-r-Uw","type":"inject","z":"mDRMOWxAyVw","name":"","topic":"","payload":"hello chirpers!","payloadType":"str","repeat":"","crontab":"","once":false,"allowDebugInput":false,"x":137,"y":38,"wires":[["SyhBmgL-B6k"]]},{"id":"SyhBmgL-B6k","type":"debug","z":"mDRMOWxAyVw","name":"","active":true,"console":"false","complete":"true","x":336,"y":86,"wires":[]}]
@monteslu
monteslu / fixedExample.js
Created March 17, 2018 01:13
better before example
const getInfo = () =>
axios.get('/users')
.then(console.log)
.then(getGroups)
.then(console.log)
.then(getFavorites)
.then(favorites => {
console.log(favorites)
return 'all done'
@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
@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
[{"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
[{"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":"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","
@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","