Raspberry Pi

The Raspberry Pi lesson index is displayed to the left.

Below are the most recent lessons.

RPi Node-Red: BME280

Parts List: Getting Started: Setting up the Hardware Setting up Node-Red 1) Start Node-Red and navigate to 127.0.0.1:1880. If your Raspberry Pi does not have the node-red-contrib-bme280 palette, follow the instructions located here. 2) After installing the BME280 palette, place the Bme280 node onto the workflow. 3) What the Bme280 node does is read sensor data from […]

Raspi Weather Display with Icons

  Resources: Raspberry air-quality kit with LED panels setup. Some icons, these were prepared earlier:   Building the flow: If you ever get stuck along the way, feel free to copy the entire flow from here and import it into your node-red: [{“id”:”ed465cb7.d4944″,”type”:”tab”,”label”:”Flow 2″,”disabled”:false,”info”:””},{“id”:”411f7586.434bcc”,”type”:”inject”,”z”:”ed465cb7.d4944″,”name”:””,”topic”:””,”payload”:””,”payloadType”:”date”,”repeat”:”1″,”crontab”:””,”once”:true,”onceDelay”:0.1,”x”:190,”y”:260,”wires”:[[“8a3f6b9e.de4138”]]},{“id”:”8a3f6b9e.de4138″,”type”:”Bme280″,”z”:”ed465cb7.d4944″,”name”:””,”bus”:”1″,”address”:”0x76″,”topic”:”bme280″,”extra”:false,”x”:380,”y”:260,”wires”:[[“6a071f4.48389e”]]},{“id”:”6a071f4.48389e”,”type”:”BME280-Parse”,”z”:”ed465cb7.d4944″,”name”:””,”x”:570,”y”:260,”wires”:[[“bc3d596d.2a3848″,”29830fae.65e84”],[],[]]},{“id”:”bc3d596d.2a3848″,”type”:”text-to-matrix”,”z”:”ed465cb7.d4944″,”name”:””,”xOffset”:0,”yOffset”:0,”rgb”:”0,255,41″,”font”:”6×9.bdf”,”prefix”:”Temperature C: “,”source”:”msg.payload”,”matrix”:”892e8063.2e0c3″,”zLevel”:””,”x”:820,”y”:160,”wires”:[]},{“id”:”11d60dbb.385ee2″,”type”:”image-to-matrix”,”z”:”ed465cb7.d4944″,”name”:””,”file”:””,”xOffset”:”96″,”yOffset”:”32″,”matrix”:”892e8063.2e0c3″,”zLevel”:””,”x”:850,”y”:300,”wires”:[]},{“id”:”29830fae.65e84″,”type”:”function”,”z”:”ed465cb7.d4944″,”name”:”get current icon”,”func”:”//setup some definitions\ncurrentTemperature = msg.payload\ncold = -3\nhot = […]

Setting up a raspberry shake NOOBS image

Resources: SD card, SD card reader, Raspberry Shake NOOBS zip: https://gitlab.com/raspberryShake-public/raspShake-SD-img/raw/master/raspishake-release.zip?inline=false Preparing the SD card: The raspberry shake installer needs the SD card to be formatted with a specific type of file system called FAT32, usually if you buy a blank SD card it comes pre-formated like this; but if you’ve already used it for […]

RPi Node-Red: Minimal Selfie Station Tutorial

Parts List:   What is a Minimal Selfie Station? We will create a node-red flow to take selfies and display them right on the raspberry-pi desktop, using the LED-ring as a flash. To achieve this we will need to go through several steps: activate the LED-ring, take a picture, and open it on the desktop. […]

RPi – Test Flow – Selfie Station

To use copy and paste the below code into your Node-Red import window. [{“id”:”a55ecedd.0645c”,”type”:”rpi-neopixels”,”z”:”37a556b3.c240ba”,”name”:”led ring”,”pixels”:”12″,”bgnd”:””,”fgnd”:””,”wipe”:”0″,”mode”:”pixels”,”rgb”:”rgb”,”brightness”:”80″,”gamma”:true,”x”:700,”y”:60,”wires”:[]},{“id”:”87ed0744.98f828″,”type”:”camerapi-takephoto”,”z”:”37a556b3.c240ba”,”filemode”:”2″,”filename”:””,”filedefpath”:”1″,”filepath”:””,”fileformat”:”jpeg”,”resolution”:”9″,”rotation”:”0″,”fliph”:”0″,”flipv”:”0″,”brightness”:”50″,”contrast”:”0″,”sharpness”:”0″,”quality”:”80″,”imageeffect”:”none”,”exposuremode”:”auto”,”iso”:”0″,”agcwait”:”1.0″,”led”:”0″,”awb”:”auto”,”name”:””,”x”:220,”y”:340,”wires”:[[“ff1b217a.3a134″,”1b3e1abe.0e8145”]]},{“id”:”7658355c.89396c”,”type”:”rpi-gpio in”,”z”:”37a556b3.c240ba”,”name”:””,”pin”:”32″,”intype”:”down”,”debounce”:”25″,”read”:false,”x”:80,”y”:60,”wires”:[[“6872ffde.e33c9”]]},{“id”:”eb0fc181.49dd7″,”type”:”exec”,”z”:”37a556b3.c240ba”,”command”:”DISPLAY=:0.0 gpicview”,”addpay”:true,”append”:”&”,”useSpawn”:”false”,”timer”:””,”oldrc”:false,”name”:”Open image file”,”x”:500,”y”:460,”wires”:[[],[],[]]},{“id”:”ff1b217a.3a134″,”type”:”function”,”z”:”37a556b3.c240ba”,”name”:”Check if filename payload”,”func”:”if(msg.payload.length > 5)\n return msg;”,”outputs”:1,”noerr”:0,”x”:270,”y”:460,”wires”:[[“eb0fc181.49dd7”]]},{“id”:”6872ffde.e33c9″,”type”:”delay”,”z”:”37a556b3.c240ba”,”name”:””,”pauseType”:”rate”,”timeout”:”5″,”timeoutUnits”:”seconds”,”rate”:”1″,”nbRateUnits”:”5″,”rateUnits”:”second”,”randomFirst”:”1″,”randomLast”:”5″,”randomUnits”:”seconds”,”drop”:true,”x”:260,”y”:60,”wires”:[[“d88eb221.18aaa”,”2f031fd.94cf5e”]]},{“id”:”1b3e1abe.0e8145″,”type”:”change”,”z”:”37a556b3.c240ba”,”name”:”turn off LED ring”,”rules”:[{“t”:”set”,”p”:”payload”,”pt”:”msg”,”to”:”0,12,0,0,0″,”tot”:”str”}],”action”:””,”property”:””,”from”:””,”to”:””,”reg”:false,”x”:510,”y”:340,”wires”:[[“a55ecedd.0645c”]]},{“id”:”d88eb221.18aaa”,”type”:”delay”,”z”:”37a556b3.c240ba”,”name”:””,”pauseType”:”delay”,”timeout”:”.5″,”timeoutUnits”:”seconds”,”rate”:”1″,”nbRateUnits”:”1″,”rateUnits”:”second”,”randomFirst”:”1″,”randomLast”:”5″,”randomUnits”:”seconds”,”drop”:false,”x”:280,”y”:120,”wires”:[[“3bf98e22.205622″,”95e7c6b7.584908”]]},{“id”:”2f031fd.94cf5e”,”type”:”change”,”z”:”37a556b3.c240ba”,”name”:”Set LED ring = Red”,”rules”:[{“t”:”set”,”p”:”payload”,”pt”:”msg”,”to”:”1,12,0,255,0″,”tot”:”str”}],”action”:””,”property”:””,”from”:””,”to”:””,”reg”:false,”x”:490,”y”:60,”wires”:[[“a55ecedd.0645c”]]},{“id”:”3bf98e22.205622″,”type”:”change”,”z”:”37a556b3.c240ba”,”name”:”Set LED ring = Green”,”rules”:[{“t”:”set”,”p”:”payload”,”pt”:”msg”,”to”:”0,12,255,0,0″,”tot”:”str”}],”action”:””,”property”:””,”from”:””,”to”:””,”reg”:false,”x”:500,”y”:120,”wires”:[[“a55ecedd.0645c”]]},{“id”:”2fae3801.80ef68″,”type”:”change”,”z”:”37a556b3.c240ba”,”name”:”Set LED ring = Blue”,”rules”:[{“t”:”set”,”p”:”payload”,”pt”:”msg”,”to”:”0,12,0,0,255″,”tot”:”str”}],”action”:””,”property”:””,”from”:””,”to”:””,”reg”:false,”x”:500,”y”:180,”wires”:[[“a55ecedd.0645c”]]},{“id”:”95e7c6b7.584908″,”type”:”delay”,”z”:”37a556b3.c240ba”,”name”:””,”pauseType”:”delay”,”timeout”:”.5″,”timeoutUnits”:”seconds”,”rate”:”1″,”nbRateUnits”:”1″,”rateUnits”:”second”,”randomFirst”:”1″,”randomLast”:”5″,”randomUnits”:”seconds”,”drop”:false,”x”:280,”y”:180,”wires”:[[“2fae3801.80ef68″,”ce6b30a5.01a5f”]]},{“id”:”d8514317.e48f7″,”type”:”change”,”z”:”37a556b3.c240ba”,”name”:”Set LED ring = White”,”rules”:[{“t”:”set”,”p”:”payload”,”pt”:”msg”,”to”:”0,12,255,255,255″,”tot”:”str”}],”action”:””,”property”:””,”from”:””,”to”:””,”reg”:false,”x”:500,”y”:240,”wires”:[[“a55ecedd.0645c”]]},{“id”:”ce6b30a5.01a5f”,”type”:”delay”,”z”:”37a556b3.c240ba”,”name”:””,”pauseType”:”delay”,”timeout”:”.5″,”timeoutUnits”:”seconds”,”rate”:”1″,”nbRateUnits”:”1″,”rateUnits”:”second”,”randomFirst”:”1″,”randomLast”:”5″,”randomUnits”:”seconds”,”drop”:false,”x”:280,”y”:240,”wires”:[[“d8514317.e48f7″,”87ed0744.98f828”]]}]  

RPi-NodeRed OLED IP Address Display

Please copy and paste the entire code block below into the node-red clipboard import window. [{“id”:”a1ae5e26.b300a”,”type”:”String”,”z”:”e0e44734.95d078″,”name”:”OLED”,”display”:”4fe1da30.5141a4″,”x”:690,”y”:220,”wires”:[]},{“id”:”60037f1d.3914b”,”type”:”function”,”z”:”e0e44734.95d078″,”name”:”Format Message”,”func”:”msg.payload={\nx:1, \ny:50,\ntext:\”IP \”+msg.payload+\”:1880\”\n}\n\nreturn msg;”,”outputs”:1,”noerr”:0,”x”:520,”y”:220,”wires”:[[“a1ae5e26.b300a”]]},{“id”:”8971c892.2fa0f8″,”type”:”change”,”z”:”e0e44734.95d078″,”name”:”IP”,”rules”:[{“t”:”set”,”p”:”payload”,”pt”:”msg”,”to”:”payload[0].address”,”tot”:”msg”}],”action”:””,”property”:””,”from”:””,”to”:””,”reg”:false,”x”:350,”y”:220,”wires”:[[“60037f1d.3914b”]]},{“id”:”974cfafc.e526d8″,”type”:”inject”,”z”:”e0e44734.95d078″,”name”:””,”topic”:””,”payload”:”10″,”payloadType”:”num”,”repeat”:”60″,”crontab”:””,”once”:true,”onceDelay”:0.1,”x”:90,”y”:220,”wires”:[[“8c7a8725.02fa58”]]},{“id”:”8c7a8725.02fa58″,”type”:”hostip”,”z”:”e0e44734.95d078″,”name”:”Host IP”,”x”:220,”y”:220,”wires”:[[“8971c892.2fa0f8”]]},{“id”:”8f95bb29.b800d8″,”type”:”comment”,”z”:”e0e44734.95d078″,”name”:”Display IP address on the mini OLED display”,”info”:””,”x”:300,”y”:180,”wires”:[]},{“id”:”4fe1da30.5141a4″,”type”:”oled-config”,”z”:””,”name”:””,”width”:”128″,”height”:”64″,”address”:”3c”}]

RPi Node-Red: Buzzer

Parts List: What is a Piezoelectric Buzzer? A piezoelectric buzzer is a buzzer that is activated with an oscillating electric signal.  This means to produce a tone the buzzer must be turned on and off many times per second. The faster the the buzzer is turned on and off the higher the pitch is produced. […]

RPi Node-Red: Push Button+ RGB LED or Buzzer

Parts List: Getting Started: Setting up the Hardware Setting up Node-Red Start Node-Red and navigate to 127.0.0.1:1880.  Drag one Raspberry Pi input node and five Raspberry Pi output nodes into the flow area. Double click on the Raspberry Pi input node to open its configuration menu.  Set the Pin to GPIO25.  Name the node “Button”. […]

RPi Node-Red: PIR + RGB LED or Buzzer

Parts List: Getting Started: Setting up the Hardware Setting up Node-Red Start Node-Red and navigate to 127.0.0.1:1880.  Drag one Raspberry Pi input node and five Raspberry Pi output nodes into the flow area. Double click on the Raspberry Pi input node to open its configuration menu.  Set the Pin to GPIO20.  Name the node “PIR”. […]

RPi Node-Red: RGB LED

Parts List: Getting Started: Setting up the hardware: Setting up on Node-Red: Setting up Out Nodes     Setting up Inject Nodes: Deploy the flow