Skip to content

Instantly share code, notes, and snippets.

View itarozzi's full-sized avatar

Ivan Tarozzi itarozzi

View GitHub Profile
@itarozzi
itarozzi / nodered-servo-sg90.json
Created December 24, 2017 15:29
Pilotaggio motore servo SG90 tramite nodered e raspberrypi
[{"id":"e9f26bf2.51a1e8","type":"tab","label":"Flow 1"},{"id":"e65eb1d4.f359d","type":"rpi-gpio out","z":"e9f26bf2.51a1e8","name":"","pin":"12","set":"","level":"0","freq":"50","out":"pwm","x":529,"y":117,"wires":[]},{"id":"34a4b700.0a9fca","type":"ui_slider","z":"e9f26bf2.51a1e8","name":"","label":"slider","group":"b3066501.1aaf08","order":0,"width":"5","height":"1","passthru":true,"topic":"","min":"3","max":"11","step":"0.5","x":89,"y":80,"wires":[["c7f965b8.e7a678"]]},{"id":"6612d877.5130b8","type":"ui_text","z":"e9f26bf2.51a1e8","group":"b3066501.1aaf08","order":0,"width":0,"height":0,"name":"","label":"","format":"{{msg.payload}}","layout":"col-center","x":518,"y":190,"wires":[]},{"id":"c7f965b8.e7a678","type":"change","z":"e9f26bf2.51a1e8","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":324,"y":153,"wires":[["e65eb1d4.f359d","6612d877.5130b8"]]},{"id":"1478d66e.d2a18a","type":"ui_button","z":"e9f26bf2.51a1e8"
@itarozzi
itarozzi / gist:6c59100b75fce3cf8ba629a630107359
Last active December 18, 2017 10:07
node-red openweathermap
[{"id":"bdd761c0.cec2c","type":"openweathermap","z":"936009a3.657d78","name":"","wtype":"forecast","lon":"","lat":"","city":"Rimini","country":"IT","language":"it","x":636.0173301696777,"y":306.0104284286499,"wires":[["2e1aca67.1f3da6","66be96c9.f4e458"]]},{"id":"5cd99dad.d756c4","type":"inject","z":"936009a3.657d78","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":437.01733016967773,"y":311.01044845581055,"wires":[["bdd761c0.cec2c"]]},{"id":"2e1aca67.1f3da6","type":"debug","z":"936009a3.657d78","name":"","active":true,"console":"false","complete":"true","x":1057.0174560546875,"y":391.0104923248291,"wires":[]},{"id":"504b05b0.0d78ec","type":"json","z":"936009a3.657d78","name":"","pretty":"false","x":1058.0173473358154,"y":306.01043128967285,"wires":[["638c5f61.132a8"]]},{"id":"638c5f61.132a8","type":"file","z":"936009a3.657d78","name":"","filename":"openweather-result.json","appendNewline":true,"createDir":false,"overwriteFile":"true","x":1262.0173416137695,"y":
/*
Adattamento dello sketch tratto dal seguente link, per la trasmissione di valori multipli
http://www.ardumotive.com/how-to-use-xbee-modules-as-transmitter--receiver-en.html
~ Simple Arduino - xBee Transmitter sketch ~
Read an analog value from potentiometer, then convert it to PWM and finally send it through serial port to xBee.
The xBee serial module will send it to another xBee (resiver) and an Arduino will turn on (fade) an LED.
The sending message starts with '<' and closes with '>' symbol.