Tyeth Gundry
Published

NodeRED Raspberry Pi ZeroW plus Pimoroni InkyPHAT

This is a quick recreation of the pimoroni python example using nodered as the trigger, with dynamic text.

BeginnerProtip30 minutes1,763
NodeRED Raspberry Pi ZeroW plus Pimoroni InkyPHAT

Things used in this project

Hardware components

Raspberry Pi Zero Wireless
Raspberry Pi Zero Wireless
Any Pi* compatible board will do.
×1
Inky pHAT
Pimoroni Inky pHAT
If you don't have the RED version, change the code to use BLACK or YELLOW instead. (BLACK works for red/yellow too and is quicker!)
×1

Software apps and online services

Node-RED
Node-RED
https://www.nodered.org/
Met Office Weather DataHub
Signup, create an app and subscribe it to the free tier for 360 api requests/day. Then goto the API list and play around https://metoffice.apiconnect.ibmcloud.com/metoffice/production/api

Story

Read more

Schematics

This way around!

It's an instructional image to show how to connect the inky phat to a raspberry pi 3B

Code

NodeRED Flow

JSON
import into nodered and then use the trigger node.
[
    {
        "id": "2ae964d8.0352ac",
        "type": "tab",
        "label": "Flow 1",
        "disabled": false,
        "info": ""
    },
    {
        "id": "669a573c.5a3a38",
        "type": "exec",
        "z": "2ae964d8.0352ac",
        "command": "/home/pi/Pimoroni/inky/examples/name-badge.py -t phat -c red -n ",
        "addpay": true,
        "append": "",
        "useSpawn": "false",
        "timer": "",
        "oldrc": false,
        "name": "",
        "x": 300,
        "y": 320,
        "wires": [
            [
                "16eb96d9.0e61c9"
            ],
            [
                "c3e735d5.b62118"
            ],
            [
                "6000a36a.b8d4fc"
            ]
        ]
    },
    {
        "id": "50cc51c3.e5721",
        "type": "inject",
        "z": "2ae964d8.0352ac",
        "name": "",
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "x": 120,
        "y": 140,
        "wires": [
            [
                "2b3732d6.b24d6e"
            ]
        ]
    },
    {
        "id": "6d1927d4.c3d078",
        "type": "catch",
        "z": "2ae964d8.0352ac",
        "name": "",
        "scope": null,
        "uncaught": false,
        "x": 400,
        "y": 140,
        "wires": [
            [
                "1feede45.577e62"
            ]
        ]
    },
    {
        "id": "1feede45.577e62",
        "type": "debug",
        "z": "2ae964d8.0352ac",
        "name": "catch",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "x": 530,
        "y": 140,
        "wires": []
    },
    {
        "id": "2b3732d6.b24d6e",
        "type": "template",
        "z": "2ae964d8.0352ac",
        "name": "",
        "field": "payload",
        "fieldType": "msg",
        "format": "handlebars",
        "syntax": "mustache",
        "template": "\"Name: {{payload}}\"",
        "output": "str",
        "x": 140,
        "y": 240,
        "wires": [
            [
                "669a573c.5a3a38"
            ]
        ]
    },
    {
        "id": "16eb96d9.0e61c9",
        "type": "debug",
        "z": "2ae964d8.0352ac",
        "name": "msg_stdout",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "x": 690,
        "y": 280,
        "wires": []
    },
    {
        "id": "c3e735d5.b62118",
        "type": "debug",
        "z": "2ae964d8.0352ac",
        "name": "msg_stderr",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "x": 690,
        "y": 320,
        "wires": []
    },
    {
        "id": "6000a36a.b8d4fc",
        "type": "debug",
        "z": "2ae964d8.0352ac",
        "name": "return code",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "x": 690,
        "y": 360,
        "wires": []
    }
]

Credits

Tyeth Gundry

Tyeth Gundry

7 projects • 8 followers
Love solving problems

Comments