Skip to content

Instantly share code, notes, and snippets.

@dmalawey
Last active September 6, 2020 14:30
Show Gist options
  • Save dmalawey/e52e4492d373fda80928d054d87c0f9d to your computer and use it in GitHub Desktop.
Save dmalawey/e52e4492d373fda80928d054d87c0f9d to your computer and use it in GitHub Desktop.
nodered flow for plotting single axis of gamepad on SCUTTLE Robot
[{"id":"4a052b50.075214","type":"tab","label":"PlotGP","disabled":false,"info":""},{"id":"dc90d6ca.9573c8","type":"ui_chart","z":"4a052b50.075214","name":"GamePad axis0 Chart","group":"341ef7b5.bb9218","order":6,"width":0,"height":0,"label":"Gamepad Axis0 Chart","chartType":"line","legend":"false","xformat":"HH:mm","interpolate":"linear","nodata":"Waiting for Data...","dot":false,"ymin":"-100","ymax":"100","removeOlder":"10","removeOlderPoints":"","removeOlderUnit":"60","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":240,"y":260,"wires":[[]]},{"id":"350633a1.11bc9c","type":"ui_gauge","z":"4a052b50.075214","name":"","group":"341ef7b5.bb9218","order":1,"width":0,"height":0,"gtype":"gage","title":"Gamepad Axis0 Value","label":"percent","format":"{{value}}","min":"-100","max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":240,"y":220,"wires":[]},{"id":"1cbd9feb.395ee","type":"file in","z":"4a052b50.075214","name":"read uFile.txt","filename":"/tmp/uFile.txt","format":"utf8","chunk":false,"sendError":false,"encoding":"none","x":150,"y":140,"wires":[["dc90d6ca.9573c8","350633a1.11bc9c"]]},{"id":"150fc07a.53e21","type":"inject","z":"4a052b50.075214","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"0.25","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":105,"y":60,"wires":[["1cbd9feb.395ee"]]},{"id":"341ef7b5.bb9218","type":"ui_group","z":"","name":"Default","tab":"d7c99dbb.b1cd4","order":1,"disp":true,"width":"9","collapse":false},{"id":"d7c99dbb.b1cd4","type":"ui_tab","z":"","name":"Home","icon":"dashboard","order":2,"disabled":false,"hidden":false}]
@dmalawey
Copy link
Author

dmalawey commented Sep 6, 2020

Here's the video explaining how to use this code.
https://youtu.be/EQzNhDv-AKI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment