-
Notifications
You must be signed in to change notification settings - Fork 0
/
codercar-node-red-flows.json
1 lines (1 loc) · 25.7 KB
/
codercar-node-red-flows.json
1
[{"id":"49cf12d3.8f264c","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"12eaee7c.550d52","type":"mqtt out","z":"49cf12d3.8f264c","name":"","topic":"text/input","qos":"2","retain":"","broker":"227cd9fe.7647e6","x":240,"y":120,"wires":[]},{"id":"fe5a9400.779208","type":"mqtt in","z":"49cf12d3.8f264c","name":"","topic":"text/input","qos":"2","datatype":"auto","broker":"227cd9fe.7647e6","x":240,"y":280,"wires":[["76d1e102.7769d"]]},{"id":"87c13ca.8fc38c","type":"ui_text_input","z":"49cf12d3.8f264c","name":"","label":"Text input","tooltip":"Input some text here and press Tab/Enter; it'll show up in the box below","group":"550db882.58bd88","order":1,"width":0,"height":0,"passthru":true,"mode":"text","delay":"0","topic":"","x":240,"y":40,"wires":[["12eaee7c.550d52"]]},{"id":"76d1e102.7769d","type":"ui_text","z":"49cf12d3.8f264c","group":"550db882.58bd88","order":2,"width":0,"height":0,"name":"","label":"Text Output:","format":"{{msg.payload}}","layout":"row-spread","x":230,"y":360,"wires":[]},{"id":"cd8ad366.80b2f","type":"ui_switch","z":"49cf12d3.8f264c","name":"","label":"B - Backwards","tooltip":"","group":"b03a308.5b614d","order":4,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"0","onvalueType":"num","onicon":"","oncolor":"","offvalue":"1","offvalueType":"num","officon":"","offcolor":"","x":1120,"y":240,"wires":[["16115db8.5cba42"]]},{"id":"c128c8f5.262548","type":"rpi-gpio out","z":"49cf12d3.8f264c","name":"","pin":"40","set":false,"level":"0","freq":"","out":"out","x":1420,"y":560,"wires":[]},{"id":"f3d1c1fe.f3e65","type":"ui_switch","z":"49cf12d3.8f264c","name":"","label":"B - Forwards","tooltip":"","group":"b03a308.5b614d","order":3,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"0","onvalueType":"num","onicon":"","oncolor":"","offvalue":"1","offvalueType":"num","officon":"","offcolor":"","x":1130,"y":180,"wires":[["7e69ff5.688c9"]]},{"id":"c7f141ea.48b2","type":"ui_switch","z":"49cf12d3.8f264c","name":"","label":"A - Forwards","tooltip":"","group":"b03a308.5b614d","order":1,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"0","onvalueType":"num","onicon":"","oncolor":"","offvalue":"1","offvalueType":"num","officon":"","offcolor":"","x":1130,"y":120,"wires":[["3af2bef8.ec4732"]]},{"id":"4e5bb2f5.a7f5cc","type":"ui_switch","z":"49cf12d3.8f264c","name":"","label":"D - Forwards","tooltip":"","group":"b03a308.5b614d","order":7,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"0","onvalueType":"num","onicon":"","oncolor":"","offvalue":"1","offvalueType":"num","officon":"","offcolor":"","x":1130,"y":860,"wires":[["8672eab3.796178"]]},{"id":"ff604eed.96921","type":"ui_switch","z":"49cf12d3.8f264c","name":"","label":"D - Backwards","tooltip":"","group":"b03a308.5b614d","order":8,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"0","onvalueType":"num","onicon":"","oncolor":"","offvalue":"1","offvalueType":"num","officon":"","offcolor":"","x":1120,"y":800,"wires":[["c128c8f5.262548"]]},{"id":"956c9249.19015","type":"ui_switch","z":"49cf12d3.8f264c","name":"","label":"C - Backwards","tooltip":"","group":"b03a308.5b614d","order":6,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"0","onvalueType":"num","onicon":"","oncolor":"","offvalue":"1","offvalueType":"num","officon":"","offcolor":"","x":1120,"y":920,"wires":[["a5555ff.20a95a"]]},{"id":"ac3fd58c.ba3838","type":"ui_switch","z":"49cf12d3.8f264c","name":"","label":"C - Forwards","tooltip":"","group":"b03a308.5b614d","order":5,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"0","onvalueType":"num","onicon":"","oncolor":"","offvalue":"1","offvalueType":"num","officon":"","offcolor":"","x":1130,"y":980,"wires":[["7e45d1e5.460ba"]]},{"id":"7332ba95.5090e4","type":"ui_switch","z":"49cf12d3.8f264c","name":"","label":"A - Backwards","tooltip":"","group":"b03a308.5b614d","order":2,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"0","onvalueType":"num","onicon":"","oncolor":"","offvalue":"1","offvalueType":"num","officon":"","offcolor":"","x":1120,"y":60,"wires":[["38a4d09a.30385"]]},{"id":"8672eab3.796178","type":"rpi-gpio out","z":"49cf12d3.8f264c","name":"","pin":"38","set":false,"level":"0","freq":"","out":"out","x":1420,"y":620,"wires":[]},{"id":"a5555ff.20a95a","type":"rpi-gpio out","z":"49cf12d3.8f264c","name":"","pin":"36","set":false,"level":"0","freq":"","out":"out","x":1420,"y":680,"wires":[]},{"id":"7e45d1e5.460ba","type":"rpi-gpio out","z":"49cf12d3.8f264c","name":"","pin":"37","set":false,"level":"0","freq":"","out":"out","x":1420,"y":740,"wires":[]},{"id":"38a4d09a.30385","type":"rpi-gpio out","z":"49cf12d3.8f264c","name":"","pin":"35","set":false,"level":"0","freq":"","out":"out","x":1420,"y":280,"wires":[]},{"id":"3af2bef8.ec4732","type":"rpi-gpio out","z":"49cf12d3.8f264c","name":"","pin":"33","set":false,"level":"0","freq":"","out":"out","x":1420,"y":340,"wires":[]},{"id":"7e69ff5.688c9","type":"rpi-gpio out","z":"49cf12d3.8f264c","name":"","pin":"31","set":false,"level":"0","freq":"","out":"out","x":1420,"y":400,"wires":[]},{"id":"16115db8.5cba42","type":"rpi-gpio out","z":"49cf12d3.8f264c","name":"","pin":"29","set":false,"level":"0","freq":"","out":"out","x":1420,"y":460,"wires":[]},{"id":"1e2c9220.9884ae","type":"ui_switch","z":"49cf12d3.8f264c","name":"","label":"Go Backwards","tooltip":"","group":"cc3baaf6.a5a3b8","order":2,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"0","onvalueType":"num","onicon":"","oncolor":"","offvalue":"1","offvalueType":"num","officon":"","offcolor":"","x":580,"y":460,"wires":[["61f572b6.ccdb7c","38a4d09a.30385","16115db8.5cba42","c128c8f5.262548","a5555ff.20a95a"]]},{"id":"7e6648ed.38a068","type":"ui_switch","z":"49cf12d3.8f264c","name":"","label":"Go Forwards","tooltip":"","group":"cc3baaf6.a5a3b8","order":1,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"0","onvalueType":"num","onicon":"","oncolor":"","offvalue":"1","offvalueType":"num","officon":"","offcolor":"","x":590,"y":340,"wires":[["d6921c16.cac56","3af2bef8.ec4732","7e69ff5.688c9","8672eab3.796178","7e45d1e5.460ba"]]},{"id":"483b4a51.9b05e4","type":"ui_switch","z":"49cf12d3.8f264c","name":"","label":"Turn Right","tooltip":"","group":"cc3baaf6.a5a3b8","order":4,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"0","onvalueType":"num","onicon":"","oncolor":"","offvalue":"1","offvalueType":"num","officon":"","offcolor":"","x":590,"y":740,"wires":[["ecab5d17.9f52a"]]},{"id":"abfb733b.a0da","type":"ui_switch","z":"49cf12d3.8f264c","name":"","label":"Turn Left","tooltip":"","group":"cc3baaf6.a5a3b8","order":3,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"0","onvalueType":"num","onicon":"","oncolor":"","offvalue":"1","offvalueType":"num","officon":"","offcolor":"","x":600,"y":620,"wires":[["79a3a4f.bb4765c"]]},{"id":"85c54322.ad388","type":"ui_colour_picker","z":"49cf12d3.8f264c","name":"","label":"LED Colour","group":"550db882.58bd88","format":"hex","outformat":"string","showSwatch":true,"showPicker":true,"showValue":false,"showHue":false,"showAlpha":false,"showLightness":true,"square":"false","dynOutput":"false","order":3,"width":0,"height":0,"passthru":true,"topic":"","x":330,"y":1000,"wires":[["80cc2c6a.57e45"]]},{"id":"61f572b6.ccdb7c","type":"mqtt out","z":"49cf12d3.8f264c","name":"","topic":"motors/backwards","qos":"2","retain":"","broker":"227cd9fe.7647e6","x":890,"y":160,"wires":[]},{"id":"c3011e4e.9fba9","type":"mqtt in","z":"49cf12d3.8f264c","name":"","topic":"motors/backwards","qos":"2","datatype":"auto","broker":"227cd9fe.7647e6","x":310,"y":1080,"wires":[["b67699ca.3e8848"]]},{"id":"d6921c16.cac56","type":"mqtt out","z":"49cf12d3.8f264c","name":"","topic":"motors/forwards","qos":"2","retain":"","broker":"227cd9fe.7647e6","x":880,"y":100,"wires":[]},{"id":"400ff111.7c8cd","type":"mqtt in","z":"49cf12d3.8f264c","name":"","topic":"motors/forwards","qos":"2","datatype":"auto","broker":"227cd9fe.7647e6","x":320,"y":1160,"wires":[["44622ee6.6c9e3"]]},{"id":"79a3a4f.bb4765c","type":"mqtt out","z":"49cf12d3.8f264c","name":"","topic":"motors/left","qos":"2","retain":"","broker":"227cd9fe.7647e6","x":870,"y":220,"wires":[]},{"id":"ecab5d17.9f52a","type":"mqtt out","z":"49cf12d3.8f264c","name":"","topic":"motors/right","qos":"2","retain":"","broker":"227cd9fe.7647e6","x":870,"y":280,"wires":[]},{"id":"f0660836.bdcf88","type":"mqtt in","z":"49cf12d3.8f264c","name":"","topic":"motors/left","qos":"2","datatype":"auto","broker":"227cd9fe.7647e6","x":340,"y":1240,"wires":[["418d7967.f1e128"]]},{"id":"f83ab57f.7ac528","type":"mqtt in","z":"49cf12d3.8f264c","name":"","topic":"motors/right","qos":"2","datatype":"auto","broker":"227cd9fe.7647e6","x":330,"y":1320,"wires":[["3ae6947e.d89b9c"]]},{"id":"da25ba77.c31ce8","type":"comment","z":"49cf12d3.8f264c","name":"JohnnyFive.js Nodes","info":"This group of nodes uses JohnnyFive.js to\ninterface with an Arduino Nano.\n\nOne changes the colour of an LED based on input\nfrom a Colour Picker in the Dashboard.\n\nThe other four interface with the LED Matrix,\ndisplaying a happy face by default.\n\nWhen each of the four nodes at the bottom\nreceives a message via MQTT about the status\nof one of the four Directions switches in the\nDashboard, it displays an arrow corresponding\nto the relative direction your CodeRcar is\nmoving, except for the Forwards switch, which\nmakes the screen display a slightly different\nsmiling face.","x":570,"y":940,"wires":[]},{"id":"fb6fb99.7646148","type":"comment","z":"49cf12d3.8f264c","name":"Some Input Catchers","info":"This group of nodes catches inputs and sends\nthem on to the JohnnyFive.js nodes.\n\nThe first one catches the colour value chosen\nin the LED Colour Picker in the Dashboard \n(defaults to white).\n\nThe bottom four catch values from MQTT regarding\nthe status of the four Motor Direction switches\nin the Dashboard, passing the values on.","x":300,"y":940,"wires":[]},{"id":"befbe2d7.1298","type":"comment","z":"49cf12d3.8f264c","name":"Text Input/Output Nodes","info":"The top-most node is a Text input that is\ndisplayed in the Dashboard. When you press Tab\nor Enter on your keyboard after entering in\nsome characters, this node passes the value in\nthe textbox onward.\n\nThe second-from-the-top node is an MQTT input.\nIt publishes the value given to it by the Text\nInput node to the MQTT topic \"text/input\".\n\nThe third-from-the-top node is an MQTT output.\nIt subscribes to the \"text/input\" topic, and\nit relays whatever messages come from the \nMQTT input node to the Text Output node.\n\nFinally, the Text Output node displays the\nvalue of text given to it by the MQTT output\nnode.","x":250,"y":200,"wires":[]},{"id":"28d47b34.09a164","type":"comment","z":"49cf12d3.8f264c","name":"GPIO Pin Definitions","info":"The below eight nodes (in light blue) are \nGPIO (General-Purpose Input/Output) Pin\nDefinitions. They define which pins are\nconnected to which motors.\n\nIt's fairly straightforward to figure out what\nthey do if you double-click on one of them\nand look at what's inside it.","x":1430,"y":220,"wires":[]},{"id":"dd171096.946dc","type":"comment","z":"49cf12d3.8f264c","name":"Motor Direction Switches","info":"Click one of these to make your CodeRcar\nmove in a certain relative direction (Forwards,\nBackwards, Left, or Right).\n\nSee if you can follow the wires from these\nswitches back to the GPIO pins they control.","x":590,"y":540,"wires":[]},{"id":"79a9d719.5be2f8","type":"comment","z":"49cf12d3.8f264c","name":"MQTT Direction Inputs","info":"These four purple nodes publish the current\nvalue of each of the Motor Direction Switches\n(either '0' or '1') to their respective\nMQTT topics.\n\nMQTT is a lightweight messaging protocol\nbuilt on technologies like TCP (Transmission\nControl Protocol) that power the Internet.\n\nThere should be an MQTT broker (called\nMosquitto) running on your Pi (on port 1883 by\ndefault), and these nodes will automatically\nconnect with it if it is up and running.\n\nThe topics to which each of the nodes publish\nis listed on them (they take the basic form\n\"motors/direction\").","x":860,"y":60,"wires":[]},{"id":"c0e858c8.ecb1a8","type":"comment","z":"49cf12d3.8f264c","name":"Motor Control Switches","info":"These eight switches (the four directly above \nand the other four up top) send either a '0'\nor a '1' to the GPIO pins to which they\nare connected. They are very good for debugging,\nsince you can switch one on/off and see if the\nmotor connected to it is working.","x":1120,"y":1040,"wires":[]},{"id":"36d3c31f.ed4cec","type":"mqtt in","z":"49cf12d3.8f264c","name":"","topic":"distance","qos":"2","datatype":"auto","broker":"227cd9fe.7647e6","x":150,"y":620,"wires":[["6d60e973.fc5688"]]},{"id":"f1d9740f.d35018","type":"ui_text","z":"49cf12d3.8f264c","group":"550db882.58bd88","order":3,"width":0,"height":0,"name":"","label":"Distance","format":"{{msg.payload}}","layout":"row-spread","x":400,"y":620,"wires":[]},{"id":"a76bd4c1.1a94f8","type":"mqtt in","z":"49cf12d3.8f264c","name":"","topic":"accelerometer/x","qos":"2","datatype":"auto","broker":"227cd9fe.7647e6","x":240,"y":1600,"wires":[["6b0065c2.2e56bc"]]},{"id":"66e94a61.509a64","type":"ui_chart","z":"49cf12d3.8f264c","name":"","group":"a3a737fb.ae5fb8","order":4,"width":0,"height":0,"label":"Accelerometer Y","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":"5","removeOlderPoints":"500","removeOlderUnit":"60","cutout":0,"useOneColor":false,"colors":["#98df8a","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":480,"y":1660,"wires":[[]]},{"id":"96c408ae.f72998","type":"mqtt in","z":"49cf12d3.8f264c","name":"","topic":"accelerometer/y","qos":"2","datatype":"auto","broker":"227cd9fe.7647e6","x":240,"y":1660,"wires":[["66e94a61.509a64"]]},{"id":"2205f3a5.2f8cbc","type":"ui_chart","z":"49cf12d3.8f264c","name":"","group":"a3a737fb.ae5fb8","order":4,"width":0,"height":0,"label":"Accelerometer Z","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":"5","removeOlderPoints":"500","removeOlderUnit":"60","cutout":0,"useOneColor":false,"colors":["#ff7f0e","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":480,"y":1720,"wires":[[]]},{"id":"a9c9783a.67e938","type":"mqtt in","z":"49cf12d3.8f264c","name":"","topic":"accelerometer/z","qos":"2","datatype":"auto","broker":"227cd9fe.7647e6","x":240,"y":1720,"wires":[["2205f3a5.2f8cbc"]]},{"id":"6b0065c2.2e56bc","type":"ui_chart","z":"49cf12d3.8f264c","name":"","group":"a3a737fb.ae5fb8","order":2,"width":0,"height":0,"label":"Accelerometer X","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":"5","removeOlderPoints":"500","removeOlderUnit":"60","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":480,"y":1600,"wires":[[]]},{"id":"754638c.32e9ac8","type":"mqtt in","z":"49cf12d3.8f264c","name":"","topic":"gyroscope/x","qos":"2","datatype":"auto","broker":"227cd9fe.7647e6","x":790,"y":1600,"wires":[["88f80e30.e2ef4"]]},{"id":"718d0d7.92a88f4","type":"ui_chart","z":"49cf12d3.8f264c","name":"","group":"c3d3f6d7.2a98a8","order":4,"width":0,"height":0,"label":"Gyroscope Y","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":"5","removeOlderPoints":"500","removeOlderUnit":"60","cutout":0,"useOneColor":false,"colors":["#98df8a","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":1030,"y":1660,"wires":[[]]},{"id":"2b284857.9ece08","type":"mqtt in","z":"49cf12d3.8f264c","name":"","topic":"gyroscope/y","qos":"2","datatype":"auto","broker":"227cd9fe.7647e6","x":790,"y":1660,"wires":[["718d0d7.92a88f4"]]},{"id":"761e38b4.e74e08","type":"ui_chart","z":"49cf12d3.8f264c","name":"","group":"c3d3f6d7.2a98a8","order":4,"width":0,"height":0,"label":"Gyroscope Z","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":"5","removeOlderPoints":"500","removeOlderUnit":"60","cutout":0,"useOneColor":false,"colors":["#ff7f0e","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":1030,"y":1720,"wires":[[]]},{"id":"e6d38d77.e4d29","type":"mqtt in","z":"49cf12d3.8f264c","name":"","topic":"gyroscope/z","qos":"2","datatype":"auto","broker":"227cd9fe.7647e6","x":790,"y":1720,"wires":[["761e38b4.e74e08"]]},{"id":"88f80e30.e2ef4","type":"ui_chart","z":"49cf12d3.8f264c","name":"","group":"c3d3f6d7.2a98a8","order":2,"width":0,"height":0,"label":"Gyroscope X","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":"5","removeOlderPoints":"500","removeOlderUnit":"60","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":1030,"y":1600,"wires":[[]]},{"id":"e2200918.355ac8","type":"ui_chart","z":"49cf12d3.8f264c","name":"","group":"550db882.58bd88","order":4,"width":0,"height":0,"label":"Temperature","chartType":"line","legend":"false","xformat":"auto","interpolate":"bezier","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":"5","removeOlderPoints":"500","removeOlderUnit":"60","cutout":0,"useOneColor":false,"colors":["#ff7f0e","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":790,"y":1840,"wires":[[]]},{"id":"3ae9a2a1.28380e","type":"mqtt in","z":"49cf12d3.8f264c","name":"","topic":"temperature","qos":"2","datatype":"auto","broker":"227cd9fe.7647e6","x":470,"y":1840,"wires":[["e2200918.355ac8","c83925f2.f14f68"]]},{"id":"840caaba.06ce28","type":"comment","z":"49cf12d3.8f264c","name":"MPU-6050 Nodes","info":"This group of nodes takes values from MQTT \n(specifically those broadcasted by the \n[mpu6050-mqtt.js](https://github.com/BotInABoxER/codercar-utils/blob/master/mpu6050-mqtt.js)\nscript from CodeRcar Utils) and displays them on charts on\nthe dashboard.\n","x":650,"y":1540,"wires":[]},{"id":"23e72d3a.e10db2","type":"comment","z":"49cf12d3.8f264c","name":"HC-SR04 Distance Monitor","info":"These two nodes capture data from the \"distance\"\ntopic on the localhost MQTT broker, posting\nit to a text box on the Dashboard.\n\nThis is specifically for use with the\n[hc-paho.py script](https://github.com/BotInABoxER/codercar-utils/blob/master/hc-paho.py)\nfrom CodeRcar Utils.","x":230,"y":580,"wires":[]},{"id":"80cc2c6a.57e45","type":"johnny5","z":"49cf12d3.8f264c","name":"","func":"var led = new five.Led.RGB({\n pins: {\n red: 11,\n green: 10,\n blue: 9,\n }\n })\n\n led.on()\n\n led.blink(1000)\n \nnode.on(\"input\", function(msg) {\n led.color(msg.payload)\n})\n\nnode.send({topic: \"message\", payload: \"Hello There\"})","board":"da0f2c02.9a91","noerr":0,"x":540,"y":1000,"wires":[[]]},{"id":"b67699ca.3e8848","type":"johnny5","z":"49cf12d3.8f264c","name":"","func":"let heart = [\n \"01100110\",\n \"10011001\",\n \"10000001\",\n \"10000001\",\n \"01000010\",\n \"00100100\",\n \"00011000\",\n \"00000000\"\n ]\n \nlet smile = [\n \"11100111\",\n \"00000000\",\n \"01100110\",\n \"01100110\",\n \"00000000\",\n \"01000010\",\n \"01111110\",\n \"00000000\"\n];\n\nlet back = [\n \"00111100\",\n \"00111100\",\n \"00111100\",\n \"00111100\",\n \"11111111\",\n \"01111110\",\n \"00111100\",\n \"00011000\"\n];\n \nlet matrix = new five.Led.Matrix({\n pins: {\n data: 2,\n clock: 3,\n cs: 4\n }\n })\n\nmatrix.on()\n\nnode.on(\"input\", function(msg) {\n \nif (msg.payload == \"0\") {\n matrix.draw(back)\n} else if (msg.payload == \"1\") {\n matrix.draw(smile)\n}\n\n})\n\n","board":"da0f2c02.9a91","noerr":0,"x":540,"y":1080,"wires":[[]]},{"id":"44622ee6.6c9e3","type":"johnny5","z":"49cf12d3.8f264c","name":"","func":"let heart = [\n \"01100110\",\n \"10011001\",\n \"10000001\",\n \"10000001\",\n \"01000010\",\n \"00100100\",\n \"00011000\",\n \"00000000\"\n ]\n \nlet smile = [\n \"11100111\",\n \"00000000\",\n \"01100110\",\n \"01100110\",\n \"00000000\",\n \"01000010\",\n \"01111110\",\n \"00000000\"\n];\n\nlet smile2 = [\n \"00000000\",\n \"11100111\",\n \"01100110\",\n \"01100110\",\n \"00000000\",\n \"01000010\",\n \"01111110\",\n \"00000000\"\n];\n\nlet matrix = new five.Led.Matrix({\n pins: {\n data: 2,\n clock: 3,\n cs: 4\n }\n})\n\nmatrix.on()\n\nnode.on(\"input\", function(msg) {\n \nif (msg.payload == \"0\") {\n matrix.draw(smile2)\n} else if (msg.payload == \"1\") {\n matrix.draw(smile)\n}\n\n})\n\n","board":"da0f2c02.9a91","noerr":0,"x":540,"y":1160,"wires":[[]]},{"id":"418d7967.f1e128","type":"johnny5","z":"49cf12d3.8f264c","name":"","func":"let heart = [\n \"01100110\",\n \"10011001\",\n \"10000001\",\n \"10000001\",\n \"01000010\",\n \"00100100\",\n \"00011000\",\n \"00000000\"\n ]\n \nlet smile = [\n \"11100111\",\n \"00000000\",\n \"01100110\",\n \"01100110\",\n \"00000000\",\n \"01000010\",\n \"01111110\",\n \"00000000\"\n];\n\nlet left = [\n \"00010000\",\n \"00110000\",\n \"01111111\",\n \"11111111\",\n \"11111111\",\n \"01111111\",\n \"00110000\",\n \"00010000\"\n];\n \nlet matrix = new five.Led.Matrix({\n pins: {\n data: 2,\n clock: 3,\n cs: 4\n }\n})\n\nmatrix.on()\n\nnode.on(\"input\", function(msg) {\n \nif (msg.payload == \"0\") {\n matrix.draw(left)\n} else if (msg.payload == \"1\") {\n matrix.draw(smile)\n}\n\n})\n\n","board":"da0f2c02.9a91","noerr":0,"x":540,"y":1240,"wires":[[]]},{"id":"3ae6947e.d89b9c","type":"johnny5","z":"49cf12d3.8f264c","name":"","func":"let heart = [\n \"01100110\",\n \"10011001\",\n \"10000001\",\n \"10000001\",\n \"01000010\",\n \"00100100\",\n \"00011000\",\n \"00000000\"\n ]\n \nlet smile = [\n \"11100111\",\n \"00000000\",\n \"01100110\",\n \"01100110\",\n \"00000000\",\n \"01000010\",\n \"01111110\",\n \"00000000\"\n];\n\nlet right = [\n \"00001000\",\n \"00001100\",\n \"11111110\",\n \"11111111\",\n \"11111111\",\n \"11111110\",\n \"00001100\",\n \"00001000\"\n];\n \nlet matrix = new five.Led.Matrix({\n pins: {\n data: 2,\n clock: 3,\n cs: 4\n }\n})\n\nmatrix.on()\nmatrix.draw(smile)\n\nnode.on(\"input\", function(msg) {\n \nif (msg.payload == \"0\") {\n matrix.draw(right)\n} else if (msg.payload == \"1\") {\n matrix.draw(smile)\n}\n\n})\n\n","board":"da0f2c02.9a91","noerr":0,"x":540,"y":1320,"wires":[[]]},{"id":"24a35f3f.a795c","type":"ui_text","z":"49cf12d3.8f264c","group":"550db882.58bd88","order":5,"width":0,"height":0,"name":"","label":"Ambient Temperature","format":"{{msg.payload}}","layout":"row-spread","x":820,"y":1900,"wires":[]},{"id":"c83925f2.f14f68","type":"function","z":"49cf12d3.8f264c","name":"","func":"const temp = { payload: Math.floor(parseInt(msg.payload, 10)) };\nreturn temp","outputs":1,"noerr":0,"x":540,"y":2000,"wires":[["24a35f3f.a795c"]]},{"id":"d689c3b9.fcbca","type":"ui_chart","z":"49cf12d3.8f264c","name":"","group":"a3a737fb.ae5fb8","order":2,"width":0,"height":0,"label":"Distance","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":"5","removeOlderPoints":"500","removeOlderUnit":"60","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":400,"y":660,"wires":[[]]},{"id":"6d60e973.fc5688","type":"function","z":"49cf12d3.8f264c","name":"","func":"const distance = { payload: (parseInt(msg.payload, 10)) };\nif (distance.payload < 2000) { // Attempt to fix bugginess when getting too close to the sensor\n return distance\n}","outputs":1,"noerr":0,"x":150,"y":680,"wires":[["d689c3b9.fcbca","f1d9740f.d35018"]]},{"id":"7122a755.4d1238","type":"inject","z":"49cf12d3.8f264c","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":60,"y":120,"wires":[[]]},{"id":"227cd9fe.7647e6","type":"mqtt-broker","z":"","name":"","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"550db882.58bd88","type":"ui_group","z":"","name":"Inputs and Outputs","tab":"ddbd6db3.e440b","order":1,"disp":true,"width":"6","collapse":false},{"id":"b03a308.5b614d","type":"ui_group","z":"","name":"Motor Control","tab":"ddbd6db3.e440b","order":3,"disp":true,"width":"6","collapse":false},{"id":"cc3baaf6.a5a3b8","type":"ui_group","z":"","name":"Directions","tab":"ddbd6db3.e440b","order":2,"disp":true,"width":"6","collapse":false},{"id":"a3a737fb.ae5fb8","type":"ui_group","z":"","name":"Accelerometer","tab":"ddbd6db3.e440b","disp":true,"width":"6","collapse":true},{"id":"c3d3f6d7.2a98a8","type":"ui_group","z":"","name":"Gyroscope","tab":"ddbd6db3.e440b","disp":true,"width":"6","collapse":true},{"id":"da0f2c02.9a91","type":"nodebot","z":"","name":"","username":"","password":"","boardType":"firmata","serialportName":"/dev/ttyUSB0","connectionType":"local","mqttServer":"","pubTopic":"","subTopic":"","tcpHost":"","tcpPort":"","sparkId":"","sparkToken":"","beanId":"","impId":"","uuid":"","token":"","sendUuid":""},{"id":"ddbd6db3.e440b","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]