RPi Node-Red – Remote Control Car with video stream

This is a basic first draft: car kit in beta

The wiring diagram is here:

 

Wiring Diagram of Car

The default flow is below – do not import this flow if you already have a flow in your raspberry pi node-red

[{"id":"c3004570.c5fdb8","type":"tab","label":"Movement","disabled":false,"info":""},{"id":"b3ddf90e.a09218","type":"tab","label":"Video","disabled":false,"info":""},{"id":"45012f78.86c5d","type":"tab","label":"Settings","disabled":false,"info":""},{"id":"1bd47399.a5c5dc","type":"tab","label":"Extras","disabled":true,"info":""},{"id":"c892232.a6b64e","type":"ui_group","z":"","name":"Controls","tab":"f12bfb77.9e80e8","order":2,"disp":false,"width":"8","collapse":false},{"id":"408f9230.25cedc","type":"ui_group","z":"","name":"Camera","tab":"f12bfb77.9e80e8","order":1,"disp":false,"width":"11","collapse":false},{"id":"f12bfb77.9e80e8","type":"ui_tab","z":"","name":"Home","icon":"dashboard","order":1},{"id":"c22338ce.f469a8","type":"ui_base","theme":{"name":"theme-dark","lightTheme":{"default":"#0094CE","baseColor":"#0094CE","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":true,"reset":false},"darkTheme":{"default":"#097479","baseColor":"#0e777c","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":true,"reset":false},"customTheme":{"name":"Untitled Theme 1","default":"#4B7930","baseColor":"#4B7930","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"},"themeState":{"base-color":{"default":"#097479","value":"#0e777c","edited":true},"page-titlebar-backgroundColor":{"value":"#0e777c","edited":false},"page-backgroundColor":{"value":"#111111","edited":false},"page-sidebar-backgroundColor":{"value":"#000000","edited":false},"group-textColor":{"value":"#16b9c1","edited":false},"group-borderColor":{"value":"#555555","edited":false},"group-backgroundColor":{"value":"#333333","edited":false},"widget-textColor":{"value":"#eeeeee","edited":false},"widget-backgroundColor":{"value":"#0e777c","edited":false},"widget-borderColor":{"value":"#333333","edited":false},"base-font":{"value":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"}},"angularTheme":{"primary":"indigo","accents":"blue","warn":"red","background":"grey"}},"site":{"name":"Node-RED Dashboard","hideToolbar":"false","allowSwipe":"false","lockMenu":"false","allowTempTheme":"true","dateFormat":"DD/MM/YYYY","sizes":{"sx":48,"sy":48,"gx":6,"gy":6,"cx":6,"cy":6,"px":0,"py":0}}},{"id":"5d86451c.b71dec","type":"ui_tab","z":"","name":"Settings","icon":"dashboard","order":2},{"id":"ae7bc233.3c456","type":"ui_group","z":"","name":"Settings / Shutdown","tab":"5d86451c.b71dec","order":1,"disp":true,"width":"6","collapse":false},{"id":"5665ef6d.468c7","type":"PCA9685","z":"","deviceNumber":"1","address":"64","frequency":"50"},{"id":"b4d77b75.1806f8","type":"oled-config","z":"","name":"","width":"128","height":"64","address":"60"},{"id":"15e30af6.f028d5","type":"oled-config","z":"","name":"","width":"128","height":"64","address":"3c"},{"id":"69b618c6.62b938","type":"exec","z":"c3004570.c5fdb8","command":"sudo python /home/pi/Downloads/Raspi_Car/fwd.py","addpay":false,"append":"","useSpawn":"true","timer":"4","oldrc":false,"name":"","x":570,"y":60,"wires":[[],[],[]]},{"id":"5642fa90.d3aa54","type":"exec","z":"c3004570.c5fdb8","command":"sudo python /home/pi/Downloads/Raspi_Car/bwd.py","addpay":false,"append":"","useSpawn":"true","timer":"4","oldrc":false,"name":"","x":580,"y":140,"wires":[[],[],[]]},{"id":"1cc3c9fb.0cd206","type":"exec","z":"c3004570.c5fdb8","command":"sudo python /home/pi/Downloads/Raspi_Car/turn_r.py","addpay":false,"append":"","useSpawn":"true","timer":"4","oldrc":false,"name":"","x":580,"y":300,"wires":[[],[],[]]},{"id":"826cb173.39cc1","type":"exec","z":"c3004570.c5fdb8","command":"sudo python /home/pi/Downloads/Raspi_Car/turn_l.py","addpay":false,"append":"","useSpawn":"true","timer":"4","oldrc":false,"name":"","x":580,"y":220,"wires":[[],[],[]]},{"id":"3d71630b.6baaec","type":"ui_button","z":"c3004570.c5fdb8","name":"","group":"c892232.a6b64e","order":1,"width":0,"height":0,"passthru":true,"label":"FWD","color":"","bgcolor":"","icon":"","payload":"1","payloadType":"str","topic":"","x":270,"y":60,"wires":[["69b618c6.62b938","2bd73342.45bcac"]]},{"id":"7403b905.981538","type":"ui_button","z":"c3004570.c5fdb8","name":"","group":"c892232.a6b64e","order":4,"width":0,"height":0,"passthru":true,"label":"BACK","color":"","bgcolor":"","icon":"","payload":"1","payloadType":"str","topic":"","x":270,"y":140,"wires":[["5642fa90.d3aa54","2bd73342.45bcac"]]},{"id":"670ea129.3442c","type":"ui_button","z":"c3004570.c5fdb8","name":"","group":"c892232.a6b64e","order":3,"width":"4","height":"1","passthru":true,"label":"RIGHT","color":"","bgcolor":"","icon":"","payload":"1","payloadType":"str","topic":"","x":280,"y":300,"wires":[["2bd73342.45bcac","826cb173.39cc1"]]},{"id":"df8ab935.62a7b8","type":"ui_button","z":"c3004570.c5fdb8","name":"","group":"c892232.a6b64e","order":2,"width":"4","height":"1","passthru":true,"label":"LEFT","color":"","bgcolor":"","icon":"","payload":"1","payloadType":"str","topic":"","x":270,"y":220,"wires":[["1cc3c9fb.0cd206","2bd73342.45bcac"]]},{"id":"d82c04e8.1aea98","type":"inject","z":"c3004570.c5fdb8","name":"","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":60,"wires":[["3d71630b.6baaec"]]},{"id":"d586c6c3.3b7308","type":"inject","z":"c3004570.c5fdb8","name":"","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":140,"wires":[["7403b905.981538"]]},{"id":"1194b926.7fb467","type":"inject","z":"c3004570.c5fdb8","name":"","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":300,"wires":[["670ea129.3442c"]]},{"id":"a4917833.2d9588","type":"inject","z":"c3004570.c5fdb8","name":"","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":220,"wires":[["df8ab935.62a7b8"]]},{"id":"c326f349.dc3c2","type":"exec","z":"45012f78.86c5d","command":"sudo shutdown now","addpay":false,"append":"","useSpawn":"true","timer":"4","oldrc":false,"name":"","x":500,"y":80,"wires":[[],[],[]]},{"id":"5508c561.de945c","type":"ui_button","z":"45012f78.86c5d","name":"","group":"ae7bc233.3c456","order":6,"width":0,"height":0,"passthru":true,"label":"Shutdown Pi","color":"","bgcolor":"","icon":"","payload":"1","payloadType":"str","topic":"","x":290,"y":80,"wires":[["c326f349.dc3c2"]]},{"id":"82bc1029.a21df","type":"inject","z":"45012f78.86c5d","name":"","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":80,"wires":[["5508c561.de945c"]]},{"id":"9b0bcd2e.6b34","type":"ui_button","z":"1bd47399.a5c5dc","name":"","group":"c892232.a6b64e","order":5,"width":0,"height":0,"passthru":true,"label":"Servo","color":"","bgcolor":"","icon":"","payload":"90","payloadType":"num","topic":"","x":270,"y":80,"wires":[["deb27663.5e02e8"]]},{"id":"f5eadb34.69d8c8","type":"inject","z":"1bd47399.a5c5dc","name":"","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":80,"wires":[["9b0bcd2e.6b34"]]},{"id":"9efa51e0.97e71","type":"ui_button","z":"1bd47399.a5c5dc","name":"","group":"c892232.a6b64e","order":6,"width":0,"height":0,"passthru":true,"label":"Servo","color":"","bgcolor":"","icon":"","payload":"180","payloadType":"num","topic":"","x":270,"y":120,"wires":[["deb27663.5e02e8"]]},{"id":"b207ac1.566af5","type":"inject","z":"1bd47399.a5c5dc","name":"","topic":"","payload":"180","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":120,"wires":[["9efa51e0.97e71"]]},{"id":"deb27663.5e02e8","type":"exec","z":"1bd47399.a5c5dc","command":"sudo python /home/pi/Downloads/Raspi_Car/servoArg.py","addpay":true,"append":"","useSpawn":"true","timer":"4","oldrc":false,"name":"","x":610,"y":100,"wires":[["959c728f.b1179"],["959c728f.b1179"],["959c728f.b1179"]]},{"id":"959c728f.b1179","type":"debug","z":"1bd47399.a5c5dc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":730,"y":160,"wires":[]},{"id":"8571640e.026f48","type":"ui_slider","z":"1bd47399.a5c5dc","name":"","label":"slider","group":"c892232.a6b64e","order":7,"width":0,"height":0,"passthru":true,"outs":"all","topic":"","min":0,"max":"180","step":1,"x":270,"y":160,"wires":[["deb27663.5e02e8"]]},{"id":"2bd73342.45bcac","type":"timeout","z":"c3004570.c5fdb8","name":"My Timeout","outtopic":"","outsafe":"","outwarning":"","outunsafe":"Unsafe","warning":"5","timer":"20","repeat":false,"again":true,"x":250,"y":460,"wires":[["b454a19d.728fc","85eaa486.d76538"]]},{"id":"b454a19d.728fc","type":"debug","z":"c3004570.c5fdb8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":430,"y":520,"wires":[]},{"id":"85eaa486.d76538","type":"exec","z":"c3004570.c5fdb8","command":"sudo python /home/pi/Downloads/Raspi_Car/twitch.py","addpay":false,"append":"","useSpawn":"true","timer":"4","oldrc":false,"name":"","x":560,"y":460,"wires":[[],[],[]]},{"id":"7984811f.1205d","type":"inject","z":"45012f78.86c5d","name":"","topic":"","payload":"Hello!","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":470,"y":320,"wires":[["e4dcbd0.d86264"]]},{"id":"e4dcbd0.d86264","type":"String","z":"45012f78.86c5d","name":"OLED","display":"15e30af6.f028d5","x":670,"y":280,"wires":[]},{"id":"8554d33e.6eead","type":"function","z":"45012f78.86c5d","name":"Format Message","func":"if (msg.payload.length >4) \n{\n    msg.payload={\n    x:1,  \n    y:50,\n    text:\"IP \"+msg.payload+\":1880\"\n    }\n}\nelse\n{\n    msg.payload={\n    x:1,  \n    y:50,\n    text:\"No IP Address           \"\n    }\n}\nreturn msg;","outputs":1,"noerr":0,"x":520,"y":280,"wires":[["e4dcbd0.d86264"]]},{"id":"f731709.c52189","type":"change","z":"45012f78.86c5d","name":"IP","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[0].address","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":350,"y":280,"wires":[["8554d33e.6eead"]]},{"id":"c453f0d.b93711","type":"inject","z":"45012f78.86c5d","name":"","topic":"","payload":"10","payloadType":"num","repeat":"60","crontab":"","once":true,"onceDelay":0.1,"x":90,"y":280,"wires":[["801f5d06.d2c9d"]]},{"id":"801f5d06.d2c9d","type":"hostip","z":"45012f78.86c5d","name":"Host IP","x":220,"y":280,"wires":[["f731709.c52189"]]},{"id":"f66984f4.70d858","type":"comment","z":"45012f78.86c5d","name":"Display IP address on the mini OLED display","info":"","x":300,"y":240,"wires":[]},{"id":"414f604.c4230a","type":"exec","z":"45012f78.86c5d","command":"sudo reboot","addpay":false,"append":"","useSpawn":"true","timer":"4","oldrc":false,"name":"","x":470,"y":140,"wires":[[],[],[]]},{"id":"8c2297bc.a24728","type":"ui_button","z":"45012f78.86c5d","name":"","group":"ae7bc233.3c456","order":6,"width":0,"height":0,"passthru":true,"label":"Reboot Pi","color":"","bgcolor":"","icon":"","payload":"1","payloadType":"str","topic":"","x":280,"y":140,"wires":[["414f604.c4230a"]]},{"id":"bcdafe6a.1cdcd","type":"inject","z":"45012f78.86c5d","name":"","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":140,"wires":[["8c2297bc.a24728"]]},{"id":"1949951f.c994bb","type":"change","z":"b3ddf90e.a09218","name":"IP","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[0].address","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":370,"y":120,"wires":[["a910f2f1.2dd32"]]},{"id":"e4ccfcbd.2f65e","type":"inject","z":"b3ddf90e.a09218","name":"","topic":"","payload":"10","payloadType":"num","repeat":"60","crontab":"","once":true,"onceDelay":0.1,"x":110,"y":120,"wires":[["be99e886.7b65c8"]]},{"id":"be99e886.7b65c8","type":"hostip","z":"b3ddf90e.a09218","name":"Host IP","x":240,"y":120,"wires":[["1949951f.c994bb"]]},{"id":"a910f2f1.2dd32","type":"function","z":"b3ddf90e.a09218","name":"","func":"\n\n\nmsg.payload = \"http://\"+msg.payload+\"/html/min.php\"\nreturn msg;","outputs":1,"noerr":0,"x":490,"y":120,"wires":[["f2f68f7d.06dcc"]]},{"id":"f2f68f7d.06dcc","type":"ui_template","z":"b3ddf90e.a09218","group":"408f9230.25cedc","name":"","order":0,"width":0,"height":0,"format":"<iframe scrolling=no marginwidth=0 marginheight=0 frameborder=0 id=\"myFrame\" width=\"540\" height=\"440\" src = \"\"></iframe>\n<script>\n(function(scope) {\n    // watch msg object from Node-RED\n    scope.$watch('msg', function(msg) {\n        // new message received\n        var x = document.getElementById('myFrame');\n        x.setAttribute('src', msg.payload); \n        });\n})(scope);\n</script>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":620,"y":120,"wires":[[]]},{"id":"5442134b.08d54c","type":"exec","z":"1bd47399.a5c5dc","command":"sudo python /home/pi/Downloads/Raspi_Car/stop.py","addpay":false,"append":"","useSpawn":"true","timer":"4","oldrc":false,"name":"","x":560,"y":260,"wires":[[],[],[]]},{"id":"37661f0f.03b32","type":"ui_button","z":"1bd47399.a5c5dc","name":"","group":"c892232.a6b64e","order":8,"width":0,"height":0,"passthru":true,"label":"STOP","color":"","bgcolor":"","icon":"","payload":"1","payloadType":"str","topic":"","x":270,"y":260,"wires":[["5442134b.08d54c"]]},{"id":"83bf0fc1.b2a52","type":"inject","z":"1bd47399.a5c5dc","name":"","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":260,"wires":[["37661f0f.03b32"]]}]

 

 

 

 

RPi Node-Red: Inject + Debug = Hello World

What Will I Learn:

How to use the inject node to send the phrase “Hello World!” to the debug terminal 🙂 This is a classic getting started example and is usually done when first learning to program in a new language.

Parts List:

None except for your raspberry pi already setup.

Getting Started:

Starting Node-Red:

  • Start Node-Red by clicking on the red Node-Red icon on the start menu under the “Programming” section.

Starting web browser Node-Red interface:

  • Start the Chromium web browser by clicking on the blue world icon on the top bar.
  • Click on the “Node-Red” link inside Chromium on the bookmarks bar.

Getting Started:

Programming Hello World! example:

Drag an inject node into your flow from the left node palette.

Double click on the inject node (named timestamp once dragged in) and change data type to “string”

Type “Hello World!” into the Payload section just after the “string” datatype selector.

Drag in a Debug node from the output node palette.

Drag a connection line between the output of the inject node and the input of the debug node – click on the dots on the sides of the nodes to do this.

Deploy your new flow

Click the button on the left of the Inject node.

Click on the “debug” tab on the right side – the icon looks like a bug 😉 You should see your “Hello World!” string displayed

Review:

Inject and debug nodes will be used extensively throughout our other lessons and are the building blocks of understanding how JSON messages are sent between nodes.

Node-Red: DRAFT Motor Driver Flow Car Prototype DRAFT

 

[{"id":"c3004570.c5fdb8","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"69b618c6.62b938","type":"exec","z":"c3004570.c5fdb8","command":"sudo python /home/pi/Downloads/Raspi_Car/fwd.py","addpay":false,"append":"","useSpawn":"true","timer":"4","oldrc":false,"name":"","x":630,"y":200,"wires":[[],[],[]]},{"id":"5642fa90.d3aa54","type":"exec","z":"c3004570.c5fdb8","command":"sudo python /home/pi/Downloads/Raspi_Car/bwd.py","addpay":false,"append":"","useSpawn":"true","timer":"4","oldrc":false,"name":"","x":640,"y":280,"wires":[[],[],[]]},{"id":"f8d17f70.3fbf4","type":"exec","z":"c3004570.c5fdb8","command":"sudo python /home/pi/Downloads/Raspi_Car/stop.py","addpay":false,"append":"","useSpawn":"true","timer":"4","oldrc":false,"name":"","x":640,"y":360,"wires":[[],[],[]]},{"id":"1cc3c9fb.0cd206","type":"exec","z":"c3004570.c5fdb8","command":"sudo python /home/pi/Downloads/Raspi_Car/turn_r.py","addpay":false,"append":"","useSpawn":"true","timer":"4","oldrc":false,"name":"","x":640,"y":440,"wires":[[],[],[]]},{"id":"826cb173.39cc1","type":"exec","z":"c3004570.c5fdb8","command":"sudo python /home/pi/Downloads/Raspi_Car/turn_l.py","addpay":false,"append":"","useSpawn":"true","timer":"4","oldrc":false,"name":"","x":640,"y":520,"wires":[[],[],[]]},{"id":"3d71630b.6baaec","type":"ui_button","z":"c3004570.c5fdb8","name":"","group":"c892232.a6b64e","order":0,"width":0,"height":0,"passthru":true,"label":"FWD","color":"","bgcolor":"","icon":"","payload":"1","payloadType":"str","topic":"","x":350,"y":200,"wires":[["69b618c6.62b938"]]},{"id":"7403b905.981538","type":"ui_button","z":"c3004570.c5fdb8","name":"","group":"c892232.a6b64e","order":0,"width":0,"height":0,"passthru":true,"label":"BACK","color":"","bgcolor":"","icon":"","payload":"1","payloadType":"str","topic":"","x":350,"y":280,"wires":[["5642fa90.d3aa54"]]},{"id":"26b12fe1.98027","type":"ui_button","z":"c3004570.c5fdb8","name":"","group":"c892232.a6b64e","order":0,"width":0,"height":0,"passthru":true,"label":"STOP","color":"","bgcolor":"","icon":"","payload":"1","payloadType":"str","topic":"","x":350,"y":360,"wires":[["f8d17f70.3fbf4"]]},{"id":"670ea129.3442c","type":"ui_button","z":"c3004570.c5fdb8","name":"","group":"c892232.a6b64e","order":0,"width":0,"height":0,"passthru":true,"label":"RIGHT","color":"","bgcolor":"","icon":"","payload":"1","payloadType":"str","topic":"","x":360,"y":440,"wires":[["1cc3c9fb.0cd206"]]},{"id":"df8ab935.62a7b8","type":"ui_button","z":"c3004570.c5fdb8","name":"","group":"c892232.a6b64e","order":0,"width":0,"height":0,"passthru":true,"label":"LEFT","color":"","bgcolor":"","icon":"","payload":"1","payloadType":"str","topic":"","x":350,"y":520,"wires":[["826cb173.39cc1"]]},{"id":"148d913d.0df89f","type":"ui_template","z":"c3004570.c5fdb8","group":"408f9230.25cedc","name":"","order":0,"width":0,"height":0,"format":"<img name=\"main\" id=\"main\" border=\"0\" width=\"640\" height=\"480\" src=\"http://192.168.43.209:8081/videostream.cgi\">","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":200,"y":140,"wires":[[]]},{"id":"d82c04e8.1aea98","type":"inject","z":"c3004570.c5fdb8","name":"","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":210,"y":200,"wires":[["3d71630b.6baaec"]]},{"id":"d586c6c3.3b7308","type":"inject","z":"c3004570.c5fdb8","name":"","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":210,"y":280,"wires":[["7403b905.981538"]]},{"id":"53924a77.ccdcc4","type":"inject","z":"c3004570.c5fdb8","name":"","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":210,"y":360,"wires":[["26b12fe1.98027"]]},{"id":"1194b926.7fb467","type":"inject","z":"c3004570.c5fdb8","name":"","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":210,"y":440,"wires":[["670ea129.3442c"]]},{"id":"a4917833.2d9588","type":"inject","z":"c3004570.c5fdb8","name":"","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":210,"y":520,"wires":[["df8ab935.62a7b8"]]},{"id":"12245169.5658df","type":"exec","z":"c3004570.c5fdb8","command":"sudo shutdown","addpay":false,"append":"","useSpawn":"true","timer":"4","oldrc":false,"name":"","x":520,"y":680,"wires":[[],[],[]]},{"id":"89384bbd.030b48","type":"ui_button","z":"c3004570.c5fdb8","name":"","group":"c892232.a6b64e","order":0,"width":0,"height":0,"passthru":true,"label":"Shutdown Pi","color":"","bgcolor":"","icon":"","payload":"1","payloadType":"str","topic":"","x":330,"y":680,"wires":[["12245169.5658df"]]},{"id":"255b9f7d.6a346","type":"inject","z":"c3004570.c5fdb8","name":"","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":170,"y":680,"wires":[["89384bbd.030b48"]]},{"id":"c892232.a6b64e","type":"ui_group","z":"","name":"Default","tab":"f12bfb77.9e80e8","disp":true,"width":"6","collapse":false},{"id":"408f9230.25cedc","type":"ui_group","z":"","name":"Group 2","tab":"f12bfb77.9e80e8","order":2,"disp":true,"width":"12","collapse":false},{"id":"f12bfb77.9e80e8","type":"ui_tab","z":"","name":"Home","icon":"dashboard"}]

original source: https://geekworm.com/blogs/raspberry-pi/faq-of-raspberry-pi-full-function-motor-hat-robot-expansion-board

  • Download this zip file on your raspberry pi
  • Unzip this folder in your downloads folder

Raspi_Car.zip

Use this tutorial to stream video on the dashboard:

https://t3alliance.org/rpi-node-red-streaming-rpi-camera-to-dashboard/

Use template node:

T3 Lesson 8: Project – Make a Whoopee Cushion:

INTRODUCTION

This lesson is an opportunity for students to have fun converting their understanding of the technology into something in the real world.  A whoopee cushion is a glorified button that can be made out of easily available materials.

APPLICATION

This video from the Raspberry Pi Foundation has a very good description of how to make this project work.

The detailed instructions can be found here:

https://projects.raspberrypi.org/en/projects/whoopi-cushion

Our challenge is to make the audio files play using node red.  You can follow the video and install this extra output node that is capable of playing audio files.

https://flows.nodered.org/node/node-red-contrib-play-sound

 

REVIEW

If you found success or didn’t, please post a response in the forum.

T3 Lesson 7: Advanced Node-Red and the camera

INTRODUCTION

Slides

Setting up a camera can be one of the more exciting activities for your students to complete.  It provides immediate feedback that is very gratifying and provides ample opportunity to explore what can be done.

APPLICATION

Here is the basic tutorial for turning on a camera: The default for the image on the pi is for the camera to be enabled.

RPi Node-Red: Camera

Once the camera is taking photos, it wasn’t super difficult to incorporate a button into the sequence or any sort of a trigger that is based on an “if-then” scenario.  If the sonic sensor is an example of an analog device that collects data and can be set to trigger a photo when a certain threshold is reached.

RPi Node-Red: Sonic Sensor (HC-SR04)

 

 

RPi: Streaming raspberry shake data to node-red

Goal:

Learn how to send seismology data from a raspberry shake into a separate raspberry pi with node-red. And how to use the data once it arrives.

 

Resources:

Raspberry shake, setup following this guide: https://t3alliance.org/rpi-setting-up-a-raspberry-shake/

A separate raspberry pi with node-red, running on the same network

Introduction:

Raspberry shake usually processes its own data, and publishes it to it’s own public databases. However it is possible to configure raspberry shake to send a raw data-stream from itself to any device your network can reach. Raspberry shake uses a UDP stream to send data from itself to any list of ip addresses and ports that happen to be listening. Using this raw data stream you can create your own graphs, or set up alerts and triggers in node-red.

This means that the raspberry shake could be physically located anywhere in a building, or using the proper networking setup anywhere in the world and you can still comfortably receive the data in node-red on your own computer.  Imagine an email alert being sent-out by your RPi at home, because your RPi shake at school detected some unusual vibrations.  Or you could trigger a camera to go off, and email you a picture whenever footsteps were detected in your room, the possibilities are endless!

 

What is UDP?

When stuff is sent over the internet it is sent using a protocol, which is a way of organizing data so that both parties know what’s going on. If you made an agreement with a friend to always use red envelopes when a message was urgent, that would be an example of a protocol. Most of the time when you download a file, or send an email it is sent using TCP protocol; which is rather strict. For example, if something messes up and the TCP packets (analogous to envelopes with letters inside) arrive out of order, they will be reorganized and only sent to the destination when everything is sorted out. UDP is much less strict, and is more like a raw flow of data vs an orderly sequence of letters. If UDP packets arrive out of order, or have some missing, or even if the data inside is messed up they’ll usually be sent straight along to the destination.  This is useful in projects like our seismometer because it is more lightweight with less latency, also it comes with a feature called multicast which allows a data stream to be sent to multiple destinations at the same time; which is exactly what is possible with the raspberry shake.

Getting Started:

The first thing you’ll need is the IP address of the pi that will listen for the data, this can be found just by hovering over the network applet here. The easiest way to ensure the listening pi and the shake-pi are on the same network is to plug them both into the same router using ethernet cables. Otherwise setting up a WiFi connection on the shake can be tricky and even interfere with the measurements.

Connecting to the rs.local  or raspberryshake.local or even the ip_address:80 of the shake,

From the settings page, come to the UDP streams tab

Here is where you’ll need the ip address of your listening pi, it’s also important to make sure it’s connected to the same network as the shake. If the shake is using LAN this means you’ll probably have to plug your pi into LAN to.

Here I’ve entered the IP of my listening pi, and used the default port 8888

Click the plus button and don’t forget to hit save.

 

Reading the stream on raspberry pi:

Starting with a fresh flow, we’ll drag the UDP IN node in.

 

For the configuration chose the same port as we used in the rs.local config, that would be 8888, and make sure to set output to ‘a String’ instead of ‘Buffer’.
If you hook your UDP RECIEVER up to a debug node you should already be able to see a stream of data coming in, if not something is wrong with your connection (probably raspi isn’t on the same network as raspberry shake).

Next we need the raspberry shake parser node, made by the guys who build the SHAKE.
This can be installed by going into the palette manager, as of now it’s the only result when you search ‘shake’.
The installation will take a few minutes, and then you can chain it with the UDP node like so.

All the rshake parser node does is take the raw thing outputted by the UDP node, and turn it into an object with various data sorted into properties. Using a a debug node we can examine the output. For example, the ‘channel’ property allows you to discriminate between different sensors on the shake. We are using a raspberry-shake ‘1D’  so we only get one channel ‘EHZ’.

 

Now that we have received the data through the UDP ports, we can start to use the data. The data can be used as any other variable data sensor data, and to practice using the data follow the links below.

To make a real-time, Dashboard Seismogram: https://t3alliance.org/rpi-building-a-raspberry-shake-applausemeter-in-node-red/

To make a Shakemeter: https://t3alliance.org/rpi-building-a-raspberry-shake-seismogram-in-node-red

 

T3 Lesson 6: Node-Red and programming the GPIO pins

Note:  This is divided into two section

INTRODUCTION

Slides

This lesson introduces Node-Red and how it can be used to control the GPIO pins on the Raspberry Pi.   The first part of the lesson is seeing how Node-Red is a programing language that follows the basic concepts identified earlier.  The second part is in understanding the GPIO pins and how they function with and without Node-Red. A challenge activity that students build such as push button timer or stop lights will be available soon.

APPLICATION

Here are three tutorials that you can explore with your students that all go over basic Node Red GPIO pin functions.

RPi Node-Red: RGB LED

 

RPi Node-Red: Push Button

RPi Node-Red: Buzzer

REVIEW

Post your reflection in the forum, if you are comfortable sharing.  We’d like to hear how it went and what we can do to improve this process.

 

T3 Lesson 5: Scratch and Basic Programming

INTRODUCTION

This lesson teaches about some basic programming constructs using one of the simplest programming languages.  Many students will have been exposed to it, so if it’s not for your crew, skip it. There are enough advanced options that a student can make a very complicated program.  I think of it like legos – it’s a good space to play around and get familiar with the basic programming concepts.

APPLICATION

Here are slides that can be helpful in introducing this topic.

Here is a link to my explanation of the Astronaut reaction time game.  The tutorial suggests that you use the older version of Scratch on your Pi, version 1.4.  It can be done with that or else you can use the slightly slower version 2.0.  Version 2.0 is identical to what you find when you use scratch in a basic computer browser.  It is Flash-based and it runs a little slower than version 1.4.

 

T3 Lesson 4: Computers, Raspberry Pi and the internet of things

 

INTRODUCTION

This lesson is a presentation that is meant to open students eyes to the power of the Raspberry Pi.  We focus on the basics of a computer, input, and output, and share examples of cool projects that are done in a number of industries.  Biomedical, home security, seismology, environmental science are a few that can be shared. A discussion about the Internet of things (IoT) and how computer programs function will be valuable here.

Slides

APPLICATION

In the slides, there is a link to the Code.org video – What makes a computer a computer – Its an excellent introduction to the idea of a computer and the way that it takes in and puts out information.

 

After going through the video here and sharing some of the photos of cool projects I try to get a discussion going in which the students have a chance to share what problems or issues might have been addressed with the technology.    If there is someone in your community willing to share their Raspberry Pi’s project in some capacity – this is a wonderful time.  The idea here is to build excitement for what is possible and then to get them ready for the challenging work ahead.

REVIEW

Post your reflection in the forum, if you are comfortable sharing.  We’d like to hear how it went and what we can do to improve this process.

 

T3 Lesson 15: Air Quality Sensors

INTRODUCTION

Air quality is one of those topics that connects all of us.  It’s not difficult to find someone in your community who is sensitive to variations in air quality and is willing to share their story as a seed for an air quality monitoring project.   As I describe above,  our project with air quality sensors came out of the problem that our community in Hawaii faced during the 2018 volcanic eruption.

Slides

Setting up for this day depends on the resources that you have available to you.   In the story presented about Hawaii, we had students split up into teams of 3 to build air quality sensors for various areas around our region.   If you just have one, then you will want to emphasize more about the data that is collected and what it means than the building process.   Building the kit is pretty straightforward if you follow the tutorials below.

The connection with what the data means is the exciting part.  I would find someone in your community who is interested in talking with your students about Air Quality.  Once the students know how to manipulate the LCD screen, this can turn into a way for the Air Quality information (and other info) to be displayed.

APPLICATION

Here are the building steps:
https://t3alliance.org/rpi-airquality-station-indepth-assembly/
Here are the programming steps:
Here are the steps associated with programming the LCD screen:
https://t3alliance.org/rpi-airquality-station-creating-an-animated-nyancat-wallpaper/

REVIEW

You will know this is working on the specific level if students or you can notice changes in air quality after tweaking the environment slightly.  An open or closed door, any sort of dust and you should be able to detect changes.  On the larger level, if students feel comfortable applying this technology to a community issue then you have opened a huge door.  There are 3 sensors connected, nothing is stopping a student from identifying and setting this device up with more sensors that can send information to the cloud.   This basic sensor is like the gateway project to more remote monitoring projects.

 

Rpi: Time and Timezones

Goal:

Understand how to configure time and timezone settings on the raspberryPi.

What you will learn:

How to set the timezone on boot, or later and make sure time is being updated correctly.

What you will need:

RaspberryPi and an internet connection.

 

Getting Started:

The first time you boot the raspberryPi you’ll be confronted with this setup page:

This is because WiFi requires a working timezone setup from the start, when you click through you’ll have some localization settings.

But if you need to get to these settings again, they can always be accessed through the configuration menu here:
This screenshot is after I used the WiFi applet to connect to the internet, which I’ve circled.

Here is what it looks like when you set the timezone, it’s also important to configure the WiFi country correctly or you won’t be able to connect to WiFi.

Finally, you can confirm that the time is being synchronized over the internet using the terminal.
Here I’ve opened a terminal, and used ‘timedatectl’ to confirm that network time is enabled, and that the time has been synchronized.

You can also confirm that your timezone settings worked correctly here.

T3 Lesson 3: Building the Box & Raspberry Pi Kits

INTRODUCTION

Now that students are pumped up with the sense of efficacy that comes from building a brushbot, its time to switch to building a computer in components.  This is an example of an opportunity to hold space for the students to “figure it out” and continue on their growth mindset pathway.  Building the boxes can be done without much instruction given that the culture of growth mindset has been set.  Students figure out how to assemble the boxes in about 40 minutes.   If you have an hour, expect that students will spend the final part of class exploring the Pi and getting to know its features.

APPLICATION

Preparing the space – Make sure that each student has sufficient space to assemble their kit.  If you have students that are working together, make sure they have sufficient space to spread out and that they have access to power nearby.   You can share the slideshow showing a guide and a quick video of the assembly process but try to refrain from giving too much directive.  It’s a puzzle and the pieces only fit one way.

Slides

It helps to have at least two people doing it at the same time, so they can compare and help each other with the process.  We purposely did not give step-by-step instructions because the challenge is figuring it out, using your growth mindset to not give up or get too frustrated.

Here’s a video of the process.

Once the box is together, the next step is to plug in the power, monitor and raspberry pi.  This will create a functioning computer loaded with the basics of a web browser and a few games.

I recommend checking that the box is assembled and that the screws are tight before handing the students the bag of electronic equipment.

Once the bag of equipment is handed out introduce the idea of physical inputs and outputs.

Share the short video about the anatomy of a Raspberry Pi.

 

REVIEW

Allow students to explore around on the pi and recognize that this is a fully functioning computer.  Students often become interested in Minecraft.  If there is a student that you identify as “minecrafter” you can ask them to take a moment to share their skills.

Celebrate the success that just occurred!  You’ve just assembled a working computer!!  Reflect on what you did well, and what things you could improve on for your next challenge(s).

Post your reflection in the forum, if you are comfortable sharing.  We’d like to hear how it went and what we can do to improve this process.

 

Rpi Airquality Station: Indepth Assembly

Goal:

Assemble an RPi Airquality Station from the parts kit, and turn it on for the first time.

What you will learn:

Special considerations for connecting sensors to the airquality hat, and how each part in the kit goes together.

What you will need:

Full RPi Airquality Station kit.

Getting Started:

Here are the sensors, circuit board, raspberry pi, led panels, and the piece of wood they all attach onto.

First we’ll line up the led panels. The led matrix’s we use have a chained model, which means data enters one end, and is transmitted down a connected line of led panels until every pixel has been set. The arrows printed on the panels and the wood indicate the direction for data flow. Data originates in the raspberry pi, enters the airquality HAT, and goes from right to left through the led panels.

Seeing as we’re putting the panels upside down for assembly the arrows will be slightly different though.

But once they’re flipped vertically the arrows will match up with the ones printed on the wood panel.

Seeing as data flows from one panel to another we need to connect the two using the ribbon cables.

The cable on the right will eventually be plugged into the airquality hat, but it’s less awkward if you wait until later.

 

Next we’ll attach all the sensors to the airquality hat. Here is what they look like laid out before being plugged in.

The PMS sensor is oriented with the intake fan south, as pictured, make sure the screw holes are facing the wood.

It’s vital to keep cable orientation in mind when plugging these in, the cables and connectors are not polarized so if you aren’t very careful you could easily fry your entire airquality kit by plugging something in backwards.

First we’ll plug in the PMS-5003 air particulate sensor.

For this sensor the wire needs to make ONE twist, meaning the connector is oriented backwards on the board compared to on the PMS. Double check the way the sensor box is oriented and the cable while connecting these.

 

Next we’ll connect the BME-280 sensor which is the simplest

For this sensor, the cable should be lying flat against the wood without any twists, and plug straight into the airquality hat. This is the only one of the three sensors where the cable doesn’t need to be twisted.

 

Next is the MHZ C02 sensor which can be the most confusing

First check the orientation of the sensor and the hat board like in this picture. This cable has to make exactly ONE twist between the sensor and the board. You can tell if the cable is oriented correctly when the colors are flipped vertically on one side from the other. Even though it is hard to spot the twist in the above picture, you can still tell that RED is on-top on the left, and BLACK is on-top on the right; indicating that the cable has indeed made ONE twist.

 

Finally double check all the sensors and their connections.

Attaching sensor hat to led matrix:

Then the power cables need to be attached from the sensor-hat to the led panels.

Next the power cables need to be attached from the sensor-hat to the led panels.

Pay close attention to the polarity, the ‘GND’ text should line up with the black wires.

Screwing Everything Together:

Now that the tricky part is done we’ll start screwing everything together.

To attach the display’s to the wood you’ll need these parts here:

First attach the standoffs to the panel like this.

Although in your case they’ll be all kinds of ribbon cables in the way and the two panels are plugged into each-other.

Then use the screws though the backside of the wood to attach them like this.

Make sure to tuck the wires neatly how you want them, because the only way to adjust this later will be to take the entire thing apart again.

The final ribbon cable from earlier, coming out of the side of the led matrix needs to be plugged into the airquality hat as shown.

 

The ribbon cables do have a correct polarity, but this is made obvious by the latch on the connector itself.

Next we’ll attach the board and the raspberry pi to the back-plate.

Here are the parts you’ll need.

The pins in the raspberry pi will naturally line up with the socket on the airquality hat as long as the screws line up.

Here is the order that the screws and standoffs go together

This animated gif shows the assembly order.
If it’s not animated you can click on it to open it.

First screw the mini standoffs through the backplate, then the raspberry pi nestles on-top. Next the longer standoffs screw on-top of the mini-standoffs. And finally screw the sensor hat on-top of everything else.

 

Mounting the Sensors:

Next we’ll mount the sensors to the backplate.

First is the PMS which is the only one of the three sensors that uses screws. Here is a picture of how the screws go into the sensor box.

There are pre-aligned holes and an outline where it should go.

The other two sensors are simply stuck onto the board with sticky strips.

Here’s how everything looks screwed and glued down.

First Power On:

Before powering on it’s important to double check all the connector polarities against this guide.

Now it’s time for the first time node-red and grafana setup!: https://t3alliance.org/rpi-airquality-station-setting-up-the-default-flow/

 

T3 Lesson 2: Growth Mindset

 

Very soon after introducing T³Alliance it’s time to set the tone for the entire program with the introductory lesson on growth and fixed mindsets.   As outlined in the video above, this fits into three components:  1.  Teaching about growth mindset; 2 Set the tone with an ice breaker; and 3. Build a robot with a brushbot.

Here is the link to the presentation  referenced above. The easiest way to get students on the same page is to share the Carol Dweck RSA Animate video.  The video will introduce the importance of how we speak to each other about our work.

You may want to look for some materials for an ice breaker.  These can be short pieces of rope that can be used to start off the program in the Infinite Loop Handcuff Solution: https://youtu.be/aiNl-EL6vfk.

Ready yourself for the brush bots with a plan for how you intend to allow for a competition to move forward.  It may be that you have some rulers that you tape down to the table in a format for tracks.  Here is a link to a resource that can be used with instructions for a brush bot competition

APPLICATION

Do a challenging activity together where students will be outside what they are comfortable doing.  Can they, under stress, manage their emotions and practice good feedback to themselves and others?  Do they give up?  After the activity, have them rate themselves with the attached EffortRubric

We believe in allowing curiosity, exploration and PLAY to happen.  It means kids have to feel safe to explore and have fun, even in the midst of failures.

 

ADDITIONAL INFORMATION

The term we now use is “neuroplasticity” to change the way our brains think.  

 

Imagine your brain is like a forest. You could potentially make a walk­ing path anywhere, but ahead of you is the road most often followed. The ground on this path is smooth and compacted, the brush has been cleared.

It’s easy to walk on, especially since you’ve walked it hundreds of thousands of times before. You walk on it automatically, unconscious of the decision to move in its direction rather than go, or be, another way.

If you want to change a belief or a habit or a physical sensation or negative self-talk, you must create a new path. You need to take a road less traveled.

You’ll need a machete to clear away the brush and branches. You’ll probably get scratched by spiky plants and twigs along the way. It will be hard.

You may ask yourself “Why bother? There’s a perfectly good path just over there.”

It’s easy to slip back into old ways of being.

That’s why most of all, it’s absolutely necessary to walk on this new path over and over and over again until the ground is smooth and compacted, until the old path has for grown over and the forest has reclaimed that space with a density of plants. Now the easy path is the one you created, consciously and with a healing intent.

Here’s a 5-minute video about Growth Mindset vs. Fixed Mindset.

Remind students that it’s only through failure that we gain our greatest knowledge.

 

REVIEW

Congratulations on taking the first step towards your students learning all they can and not limiting themselves or others.  Changing from a “fixed” to a “growth” mindset is not easy.  We often revert back to what we know when under stress.  Encourage your students to keep this in mind as you continue to reinforce positive feedback.

 

Other tools you may want to tap into are from Carol Dweck’s site:  https://www.mindsetkit.org/

 

 

 

RPi Airquality Station: setting up the default flow

Goal:

Connect to the airquality station’s node-red instance, and configure the Grafana node.

What you will learn:

How to connect to the airquality station’s node-red, and detailed info on the Grafana node configuration.

 

What you will need:

An airquality kit connected to the internet, as per this tutorial: https://t3alliance.org/rpi-airquality-station-setup-and-access/

 

Connecting to Node-Red:

After you have connected your pi to the internet (https://t3alliance.org/rpi-airquality-station-setup-and-access/) you’re ready to setup the default flow to log data properly to Grafana.

If you’re using the pi locally (with a keyboard and display plugged into the air-quality station) you can just open the browser and click the Node-RED bookmark in the bar.  If you’re on a different computer, first find the IP address to use from the mini-oled on the airquality station, and then on your own computer enter as the URL. IP_ADDRESS:1880. Our airquality station was assigned the IP address of ‘10.71.0.196’, so to access our Node-RED flow I use ‘10.71.0.196:1880’.

Configuring the flow:

The default flow is pretty big, but not that complicated.
The part we are interested in is at the very bottom and looks like this.

 

 

 

 

 

 

 

All the sensor-nodes are being injected into a Grafana node, and then the Grafana node is being injected into a text node to print the url onto the display.
If you double click the Grafana node you’ll get a settings page like this.

The default settings do work, and do log your data onto a webpage where you can view graphs etc. However the default location is somewhere in the Arctic Circle, and you get a random jumble of numbers and letters for your Grafana url.

So the only two settings that need changing from the default are ‘Geohash’ and ‘Location Name’.
For the Geohash you can click the link in the settings page, or here: http://geohash.gofreerange.com/

Scroll around on the map, and zoom in to find your location, be mindful of how many digits you use. The geohash data will be public on the world-map. You can tell from how specific the location is from the size of the squares.
Looking at this shot of east Hawaii, ‘8e98’ is pretty good at showing where I kind of am on the island. ‘8e98n’ Shows what half of hilo-town I’m in. And then ‘8e98ny’ shows the exact area of streets I might be on. I wouldn’t recommend going further than ‘8e98’, or even ‘8e9’.

The second option is the location-name, this will allow you to use that name in the aqeasy url instead of the serial number that resides there right now. You can’t just use anything you’d like though. Location Names are not reserved, or restricted; so if you use something obvious like ‘School’, or ‘Outdoors’ you might find your data being overwritten by someone else in the future.
One other caveat is that data always sticks to the name it was uploaded with, so if you change your location name any data you recorded with the previous name won’t be on the graph with it.
So whatever name you chose now, the data on your graph will be from this moment on.

You can leave Location Name blank, the only downside is you have to use the serial-number url to look at your data.
I’m using easyboticsHilo, so now my data is visible here: g.aqeasy.com/easyboticsHilo

Remember to hit ‘deploy’ in the top right corner after you’ve finished making changes.

The data on Grafana won’t update visibly for a few minutes after you’ve set this up.

 

Viewing your data:

Once you have set your geohash in the flow and deployed, your data will start being updated onto the public world airquality map.

http://map.aqeasy.com

Your own data is viewable at the URL displayed by the default flow. If you change the flow so that it’s not displayed anymore remember that it’s being constantly outputted from the grafana node.

Here is what my data looks like at http://g.aqeasy.com/0e1c6c307

RPi Airquality Station: setup and access

Goal:

Connect your airquality kit to the internet to enable online data-logging. Either through WiFi or a wired LAN network.

What you will lean:

The best method of configuring your airquality kit depending on what hardware is available.

Parts List:

easybotics airquality kit

 

Introduction

The easybotics airquality has a default configuration that even logs your data to the grafana map, and gives you a url to access your graphs. The problem is you can’t change the node-red flow, update your geohash from the default (in the arctic circle), or create a custom-url for accessing your data. This tutorial will try and guide you through various ways to start using your airquality station to its full potential.

 

Option One: I have a puzzlePi kit

Congratulations, this is the easiest possible way to connect to your airquality kit.
First hook up your display, keyboard, and mouse to the airquality kit as pictured:

First you’ll need to setup your wifi country and timezone, the tool for doing this opens by default so it should be right there.

The most vital step of setup is getting the airquality kit onto your WiFi network. This can be accomplished with the wifi applet, here:

Next restart the pi or power cycle, when the flow starts up you should see an IP address on the mini oled display.
Now you can move on to the next tutorial: https://t3alliance.org/rpi-airquality-station-setting-up-the-default-flow/, you can even complete this tutorial using just the pi build into the device.

 

Option Two: I have a HDMI display and a keyboard/mouse

this option is actually identical to Option One, except instead of  using the puzzlePi’s display and keyboard you can use your own, scroll up and read Option One.

Option Three: I have a LAN network (simple)

If you have a LAN network that you’re PC is always connected to you can easily hook up your pi to that.
First just connect the LAN cable here:

Power cycle the airquality kit, and hopefully it should be assigned an IP that appears on the mini-oled.
Now you’re already to move-on to the next step. https://t3alliance.org/rpi-airquality-station-setting-up-the-default-flow/

 

Option Four: Use LAN to setup the WiFi

VNC server is enabled by default on the airquality station, so once you have a LAN connection as established in Option Three you can use this to setup the wifi.
Follow these instructions https://www.raspberrypi.org/documentation/remote-access/vnc/ to setup VNC client on your machine.
Remember that VNC is already enabled on the airquality station, so you can skip down to the ‘Connecting to your Raspberry Pi with VNC viewer’
VNC viewer can be downloaded for your personal computer here: https://www.realvnc.com/en/connect/download/viewer/

Remember that the IP address is listed on the oled display.

Once you have the desktop, you can use the same steps from option One to setup your wifi and move onto the next tutorial!
https://t3alliance.org/rpi-airquality-station-setting-up-the-default-flow/

RPi Airquality Station: Logging Airquality-Data to Grafana

Goal:

Log data to an online grafana database, and then view the resulting graphs and maps.

What you will learn:

  • Configuring easybotics air-quality sensors,
  • setting up the grafana logging node
  • viewing the logged data.

 

What you need to know:

Parts List:

  • Full easybotics air-quality station kit
  • Raspberry pi
  • Internet Connection

 

 

Setting up node-red:

Start Node-Red and navigate to 127.0.0.1:1880  using the web browser. Drag in all the air-quality nodes, and the BME node from the palette.
Select the C02 node, from the drop down menu select ‘Add new sensor manager’; the only configuration here is to switch the ‘Automatic C02 calibration’ to ‘Manual’.

By default the C02 Sensor will zero itself to the lowest C02 level it detects in a 24 hour period, pinning that value to 400ppm which is the atmospheric baseline. If your air-quality station is indoors, or in a crowded place this might lead to inaccurate data so you can change it here to manual.

Next select the PM concentration node, and Particulate node and select the Sensor Manager you made from the dropdown.

With this the config is far enough too start printing data to the led-matrix (if you have one); with the setup looking like this.

 

For the next steps you’ll need the influxdb username and password that should have been provided to you.
Select the ‘Publish to Influxdb’ node and enter your username and password here.
For the GeoHash field you’ll need to use a tool like this one: http://geohash.gofreerange.com Drag the map around, and click to generate different scale geohashes. Remember that the more digits you use the more specific of a location you’ll be providing to the T3 database.

Now you can link all the sensor nodes into the publish node like so:
The URL status below the node is where you can find your logged data, sadly you can’t copy and paste out of the status bar thing.  The node pushes the url out as a message, so using a debug node you can retrieve the URL and view your graphs.