Julien Darrah
Published © LGPL

R2D2pi

R2D2 toy shell brought to life using a Raspberry Pi Zero W.

AdvancedFull instructions provided20 hours2,257
R2D2pi

Things used in this project

Story

Read more

Custom parts and enclosures

Battery Circuit Mount - Part3

Battery Circuit Buttons - Part4

RPi circuit Proto Board Mount - Part1

RPi circuit Proto Board Mount - Part2

User Buttons - Proto Board Spacers

Head Gear

Optical Switch Interrupter

Leg CAM components

Leg CAM Wheel

Leg Motor Mount

Battery Circuit Mount - Part1

Battery Circuit Mount - Part2

Schematics

R2D2pi Circuit

R2D2pi Node Red Flow

Code

NodeRed Flow

JSON
{\rtf1\ansi\ansicpg1252\cocoartf1561\cocoasubrtf600
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
{\*\expandedcolortbl;;}
\margl1440\margr1440\vieww10800\viewh8400\viewkind0
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0

\f0\fs24 \cf0 [\
    \{\
        "id": "3485c53.773583a",\
        "type": "PCA9685 out",\
        "z": "311c8b43.5c0584",\
        "name": "Head Motor In1",\
        "pca9685": "84df5fdf.7962",\
        "channel": "0",\
        "payload": "",\
        "unit": "percent",\
        "onStep": "0",\
        "x": 1032,\
        "y": 358,\
        "wires": []\
    \},\
    \{\
        "id": "9ce790a.dd6127",\
        "type": "PCA9685 out",\
        "z": "311c8b43.5c0584",\
        "name": "Opto Sensor Power",\
        "pca9685": "84df5fdf.7962",\
        "channel": "6",\
        "payload": "",\
        "unit": "percent",\
        "onStep": "0",\
        "x": 892,\
        "y": 107,\
        "wires": []\
    \},\
    \{\
        "id": "1391d36f.9ba98d",\
        "type": "inject",\
        "z": "311c8b43.5c0584",\
        "name": "Off",\
        "topic": "",\
        "payload": "0",\
        "payloadType": "num",\
        "repeat": "",\
        "crontab": "",\
        "once": false,\
        "x": 678,\
        "y": 130,\
        "wires": [\
            [\
                "9ce790a.dd6127"\
            ]\
        ]\
    \},\
    \{\
        "id": "56889913.0d0208",\
        "type": "inject",\
        "z": "311c8b43.5c0584",\
        "name": "100%",\
        "topic": "",\
        "payload": "100",\
        "payloadType": "num",\
        "repeat": "",\
        "crontab": "",\
        "once": true,\
        "onceDelay": "",\
        "x": 679,\
        "y": 90,\
        "wires": [\
            [\
                "9ce790a.dd6127"\
            ]\
        ]\
    \},\
    \{\
        "id": "2c19f6f8.7281ba",\
        "type": "ui_slider",\
        "z": "311c8b43.5c0584",\
        "name": "",\
        "label": "Motor Speed",\
        "group": "4f5830f7.70499",\
        "order": 1,\
        "width": 0,\
        "height": 0,\
        "passthru": true,\
        "topic": "MotorCommand",\
        "min": "-100",\
        "max": "100",\
        "step": "100",\
        "x": 303,\
        "y": 372,\
        "wires": [\
            [\
                "7a4fc5ec.fc77ec",\
                "acae2226.82f26"\
            ]\
        ]\
    \},\
    \{\
        "id": "354753aa.32dc4c",\
        "type": "PCA9685 out",\
        "z": "311c8b43.5c0584",\
        "name": "LED Blue",\
        "pca9685": "84df5fdf.7962",\
        "channel": "12",\
        "payload": "",\
        "unit": "percent",\
        "onStep": "0",\
        "x": 556,\
        "y": 590,\
        "wires": []\
    \},\
    \{\
        "id": "a3818cb8.cfac7",\
        "type": "inject",\
        "z": "311c8b43.5c0584",\
        "name": "Off",\
        "topic": "",\
        "payload": "0",\
        "payloadType": "num",\
        "repeat": "1",\
        "crontab": "",\
        "once": true,\
        "onceDelay": "",\
        "x": 230,\
        "y": 606,\
        "wires": [\
            [\
                "e295323a.18cb9"\
            ]\
        ]\
    \},\
    \{\
        "id": "ba68a1ae.36caf",\
        "type": "inject",\
        "z": "311c8b43.5c0584",\
        "name": "100%",\
        "topic": "",\
        "payload": "100",\
        "payloadType": "num",\
        "repeat": ".75",\
        "crontab": "",\
        "once": true,\
        "onceDelay": "",\
        "x": 241,\
        "y": 566,\
        "wires": [\
            [\
                "e295323a.18cb9"\
            ]\
        ]\
    \},\
    \{\
        "id": "a7280aff.f84388",\
        "type": "PCA9685 out",\
        "z": "311c8b43.5c0584",\
        "name": "LED Green",\
        "pca9685": "84df5fdf.7962",\
        "channel": "13",\
        "payload": "",\
        "unit": "percent",\
        "onStep": "0",\
        "x": 563,\
        "y": 734,\
        "wires": []\
    \},\
    \{\
        "id": "fc12716a.f039e",\
        "type": "inject",\
        "z": "311c8b43.5c0584",\
        "name": "Off",\
        "topic": "",\
        "payload": "0",\
        "payloadType": "num",\
        "repeat": "0.75",\
        "crontab": "",\
        "once": true,\
        "onceDelay": "",\
        "x": 233,\
        "y": 748,\
        "wires": [\
            [\
                "be22b1fa.e27aa"\
            ]\
        ]\
    \},\
    \{\
        "id": "2887785d.46fc98",\
        "type": "inject",\
        "z": "311c8b43.5c0584",\
        "name": "100%",\
        "topic": "",\
        "payload": "100",\
        "payloadType": "num",\
        "repeat": "1",\
        "crontab": "",\
        "once": true,\
        "onceDelay": "",\
        "x": 218,\
        "y": 704,\
        "wires": [\
            [\
                "be22b1fa.e27aa"\
            ]\
        ]\
    \},\
    \{\
        "id": "c5912ae8.456dd8",\
        "type": "PCA9685 out",\
        "z": "311c8b43.5c0584",\
        "name": "LED Red Top",\
        "pca9685": "84df5fdf.7962",\
        "channel": "14",\
        "payload": "",\
        "unit": "percent",\
        "onStep": "0",\
        "x": 562,\
        "y": 876,\
        "wires": []\
    \},\
    \{\
        "id": "81bc7696.1405f8",\
        "type": "inject",\
        "z": "311c8b43.5c0584",\
        "name": "Off",\
        "topic": "",\
        "payload": "0",\
        "payloadType": "num",\
        "repeat": "1",\
        "crontab": "",\
        "once": true,\
        "onceDelay": "",\
        "x": 230,\
        "y": 890,\
        "wires": [\
            [\
                "144ae88f.034667"\
            ]\
        ]\
    \},\
    \{\
        "id": "238ab939.4c29d6",\
        "type": "inject",\
        "z": "311c8b43.5c0584",\
        "name": "100%",\
        "topic": "",\
        "payload": "100",\
        "payloadType": "num",\
        "repeat": ".33",\
        "crontab": "",\
        "once": true,\
        "onceDelay": "",\
        "x": 241,\
        "y": 848,\
        "wires": [\
            [\
                "144ae88f.034667"\
            ]\
        ]\
    \},\
    \{\
        "id": "3638bd65.0a3752",\
        "type": "PCA9685 out",\
        "z": "311c8b43.5c0584",\
        "name": "LED Red Bot",\
        "pca9685": "84df5fdf.7962",\
        "channel": "15",\
        "payload": "",\
        "unit": "percent",\
        "onStep": "0",\
        "x": 570,\
        "y": 1016,\
        "wires": []\
    \},\
    \{\
        "id": "ebd0f1a6.d930c",\
        "type": "inject",\
        "z": "311c8b43.5c0584",\
        "name": "Off",\
        "topic": "",\
        "payload": "0",\
        "payloadType": "num",\
        "repeat": ".75",\
        "crontab": "",\
        "once": false,\
        "onceDelay": "",\
        "x": 226,\
        "y": 1033,\
        "wires": [\
            [\
                "bccd5ede.4bfd6"\
            ]\
        ]\
    \},\
    \{\
        "id": "395dcd0c.72ab22",\
        "type": "inject",\
        "z": "311c8b43.5c0584",\
        "name": "100%",\
        "topic": "",\
        "payload": "100",\
        "payloadType": "num",\
        "repeat": ".25",\
        "crontab": "",\
        "once": false,\
        "onceDelay": "",\
        "x": 236,\
        "y": 994,\
        "wires": [\
            [\
                "bccd5ede.4bfd6"\
            ]\
        ]\
    \},\
    \{\
        "id": "e295323a.18cb9",\
        "type": "ui_switch",\
        "z": "311c8b43.5c0584",\
        "name": "",\
        "label": "LED Blue",\
        "group": "4b44ac65.e676c4",\
        "order": 2,\
        "width": 0,\
        "height": 0,\
        "passthru": true,\
        "decouple": "false",\
        "topic": "",\
        "style": "",\
        "onvalue": "100",\
        "onvalueType": "num",\
        "onicon": "",\
        "oncolor": "",\
        "offvalue": "0",\
        "offvalueType": "num",\
        "officon": "",\
        "offcolor": "",\
        "x": 369,\
        "y": 590,\
        "wires": [\
            [\
                "354753aa.32dc4c"\
            ]\
        ]\
    \},\
    \{\
        "id": "be22b1fa.e27aa",\
        "type": "ui_switch",\
        "z": "311c8b43.5c0584",\
        "name": "",\
        "label": "LED Green",\
        "group": "4b44ac65.e676c4",\
        "order": 4,\
        "width": 0,\
        "height": 0,\
        "passthru": true,\
        "decouple": "false",\
        "topic": "LED_Green",\
        "style": "",\
        "onvalue": "100",\
        "onvalueType": "num",\
        "onicon": "",\
        "oncolor": "",\
        "offvalue": "0",\
        "offvalueType": "num",\
        "officon": "",\
        "offcolor": "",\
        "x": 376,\
        "y": 733,\
        "wires": [\
            [\
                "a7280aff.f84388"\
            ]\
        ]\
    \},\
    \{\
        "id": "144ae88f.034667",\
        "type": "ui_switch",\
        "z": "311c8b43.5c0584",\
        "name": "",\
        "label": "LED Red T",\
        "group": "4b44ac65.e676c4",\
        "order": 6,\
        "width": 0,\
        "height": 0,\
        "passthru": true,\
        "decouple": "false",\
        "topic": "",\
        "style": "",\
        "onvalue": "100",\
        "onvalueType": "num",\
        "onicon": "",\
        "oncolor": "",\
        "offvalue": "0",\
        "offvalueType": "num",\
        "officon": "",\
        "offcolor": "",\
        "x": 377,\
        "y": 876,\
        "wires": [\
            [\
                "c5912ae8.456dd8"\
            ]\
        ]\
    \},\
    \{\
        "id": "bccd5ede.4bfd6",\
        "type": "ui_switch",\
        "z": "311c8b43.5c0584",\
        "name": "",\
        "label": "LED Red B",\
        "group": "4b44ac65.e676c4",\
        "order": 8,\
        "width": 0,\
        "height": 0,\
        "passthru": true,\
        "decouple": "false",\
        "topic": "",\
        "style": "",\
        "onvalue": "100",\
        "onvalueType": "num",\
        "onicon": "",\
        "oncolor": "",\
        "offvalue": "0",\
        "offvalueType": "num",\
        "officon": "",\
        "offcolor": "",\
        "x": 379,\
        "y": 1015,\
        "wires": [\
            [\
                "3638bd65.0a3752"\
            ]\
        ]\
    \},\
    \{\
        "id": "84ad92e.3326c7",\
        "type": "rpi-gpio in",\
        "z": "311c8b43.5c0584",\
        "name": "Left Sensor",\
        "pin": "15",\
        "intype": "tri",\
        "debounce": "1",\
        "read": true,\
        "x": 210,\
        "y": 51,\
        "wires": [\
            [\
                "6c93671a.1bba58"\
            ]\
        ]\
    \},\
    \{\
        "id": "20f40b4a.846e94",\
        "type": "ui_text",\
        "z": "311c8b43.5c0584",\
        "group": "4b44ac65.e676c4",\
        "order": 10,\
        "width": 0,\
        "height": 0,\
        "name": "",\
        "label": "Left Sensor",\
        "format": "\{\{msg.payload\}\}",\
        "layout": "row-spread",\
        "x": 460,\
        "y": 104,\
        "wires": []\
    \},\
    \{\
        "id": "cdffee97.e8896",\
        "type": "rpi-gpio in",\
        "z": "311c8b43.5c0584",\
        "name": "Mid Sensor",\
        "pin": "16",\
        "intype": "tri",\
        "debounce": "1",\
        "read": true,\
        "x": 218,\
        "y": 145,\
        "wires": [\
            [\
                "3b6ccee.f799f32"\
            ]\
        ]\
    \},\
    \{\
        "id": "d9f6faf9.084cb8",\
        "type": "ui_text",\
        "z": "311c8b43.5c0584",\
        "group": "4b44ac65.e676c4",\
        "order": 12,\
        "width": 0,\
        "height": 0,\
        "name": "",\
        "label": "Mid Sensor",\
        "format": "\{\{msg.payload\}\}",\
        "layout": "row-spread",\
        "x": 459,\
        "y": 192,\
        "wires": []\
    \},\
    \{\
        "id": "665381ac.5e23",\
        "type": "rpi-gpio in",\
        "z": "311c8b43.5c0584",\
        "name": "Right Sensor",\
        "pin": "18",\
        "intype": "tri",\
        "debounce": "1",\
        "read": true,\
        "x": 219,\
        "y": 230,\
        "wires": [\
            [\
                "986361cc.4391b"\
            ]\
        ]\
    \},\
    \{\
        "id": "39032a55.255716",\
        "type": "ui_text",\
        "z": "311c8b43.5c0584",\
        "group": "4b44ac65.e676c4",\
        "order": 14,\
        "width": 0,\
        "height": 0,\
        "name": "",\
        "label": "Right Sensor",\
        "format": "\{\{msg.payload\}\}",\
        "layout": "row-spread",\
        "x": 457,\
        "y": 272,\
        "wires": []\
    \},\
    \{\
        "id": "7a4fc5ec.fc77ec",\
        "type": "function",\
        "z": "311c8b43.5c0584",\
        "name": "set left speed",\
        "func": "var in1 = \{ payload: 0 \};\\nvar in2 = \{ payload: 0 \};\\nvar CurrentDirection = \{ payload: 0 \};\\n\\n// initialise the counter to 0 if it doesn't exist already\\nvar LeftSensorState = context.get('LeftSensorState')||0;\\nvar MidSensorState = context.get('MidSensorState')||0;\\nvar RightSensorState = context.get('RightSensorState')||0;\\nvar MotorCommand = context.get('MotorCommand')||0;\\nvar Trigger = context.get('Trigger')||0;\\n\\n\\n\\nif(msg.topic === \\"LeftSensor\\")\{\\n    LeftSensorState = msg.payload;\\n    context.set('LeftSensorState', msg.payload);\\n\}\\n\\nif(msg.topic === \\"MidSensor\\")\{\\n    MidSensorState = msg.payload;\\n    context.set('MidSensorState', msg.payload);\\n\}\\n\\nif(msg.topic === \\"RightSensor\\")\{\\n    RightSensorState = msg.payload;\\n    context.set('RightSensorState', msg.payload);\\n\}\\n\\nif(msg.topic === \\"MotorCommand\\")\{\\n    MotorCommand = msg.payload;\\n    context.set('MotorCommand', msg.payload);\\n\}\\n\\nif(msg.topic === \\"Trigger\\")\{\\n    Trigger = msg.payload;\\n    context.set('Trigger', msg.payload);\\n\}\\n\\n\\nif ( (MotorCommand > 0) && (RightSensorState === 0) ) \\n\{\\n    CurrentDirection = \{ payload: 2 \};\\n    \\n\\n        in2 = \{ payload: 0 \};\\n        in1 = \{ payload: MotorCommand \};\\n\\n\\n\} \\nelse if ( (MotorCommand < 0) && (LeftSensorState === 0) ) \\n\{\\n    CurrentDirection = \{ payload: 1 \};\\n\\n        in1 = \{ payload: 0 \};\\n        in2 = \{ payload: Math.abs(MotorCommand) \};\\n\\n\}\\nelse\\n\{\\n    in1 = \{ payload: 0 \};\\n    in2 = \{ payload: 0 \};\\n    CurrentDirection = \{ payload: 0 \};\\n\}\\n\\n\\nreturn [ in1, in2, CurrentDirection ];",\
        "outputs": 3,\
        "noerr": 0,\
        "x": 819,\
        "y": 372,\
        "wires": [\
            [\
                "3485c53.773583a"\
            ],\
            [\
                "1d0c8657.10059a"\
            ],\
            [\
                "a4a2564d.1a6528"\
            ]\
        ]\
    \},\
    \{\
        "id": "1d0c8657.10059a",\
        "type": "PCA9685 out",\
        "z": "311c8b43.5c0584",\
        "name": "Head Motor In2",\
        "pca9685": "84df5fdf.7962",\
        "channel": "1",\
        "payload": "",\
        "unit": "percent",\
        "onStep": "0",\
        "x": 1032,\
        "y": 394,\
        "wires": []\
    \},\
    \{\
        "id": "99cdda3.73e8928",\
        "type": "inject",\
        "z": "311c8b43.5c0584",\
        "name": "Off",\
        "topic": "",\
        "payload": "0",\
        "payloadType": "num",\
        "repeat": "",\
        "crontab": "",\
        "once": false,\
        "x": 88,\
        "y": 373,\
        "wires": [\
            [\
                "2c19f6f8.7281ba"\
            ]\
        ]\
    \},\
    \{\
        "id": "42de3b38.d6f104",\
        "type": "inject",\
        "z": "311c8b43.5c0584",\
        "name": "Forward",\
        "topic": "",\
        "payload": "100",\
        "payloadType": "num",\
        "repeat": "",\
        "crontab": "",\
        "once": false,\
        "onceDelay": "",\
        "x": 96,\
        "y": 337,\
        "wires": [\
            [\
                "2c19f6f8.7281ba"\
            ]\
        ]\
    \},\
    \{\
        "id": "b25f0270.576e",\
        "type": "inject",\
        "z": "311c8b43.5c0584",\
        "name": "Reverse",\
        "topic": "",\
        "payload": "-100",\
        "payloadType": "num",\
        "repeat": "",\
        "crontab": "",\
        "once": false,\
        "onceDelay": "",\
        "x": 87,\
        "y": 409,\
        "wires": [\
            [\
                "2c19f6f8.7281ba"\
            ]\
        ]\
    \},\
    \{\
        "id": "6c93671a.1bba58",\
        "type": "change",\
        "z": "311c8b43.5c0584",\
        "name": "LeftSensor Topic",\
        "rules": [\
            \{\
                "t": "change",\
                "p": "topic",\
                "pt": "msg",\
                "from": "topic",\
                "fromt": "msg",\
                "to": "LeftSensor",\
                "tot": "str"\
            \}\
        ],\
        "action": "",\
        "property": "",\
        "from": "",\
        "to": "",\
        "reg": false,\
        "x": 219,\
        "y": 104,\
        "wires": [\
            [\
                "20f40b4a.846e94",\
                "7a4fc5ec.fc77ec"\
            ]\
        ]\
    \},\
    \{\
        "id": "3b6ccee.f799f32",\
        "type": "change",\
        "z": "311c8b43.5c0584",\
        "name": "MidSensor Topic",\
        "rules": [\
            \{\
                "t": "change",\
                "p": "topic",\
                "pt": "msg",\
                "from": "topic",\
                "fromt": "msg",\
                "to": "MidSensor",\
                "tot": "str"\
            \}\
        ],\
        "action": "",\
        "property": "",\
        "from": "",\
        "to": "",\
        "reg": false,\
        "x": 218,\
        "y": 192,\
        "wires": [\
            [\
                "d9f6faf9.084cb8"\
            ]\
        ]\
    \},\
    \{\
        "id": "986361cc.4391b",\
        "type": "change",\
        "z": "311c8b43.5c0584",\
        "name": "RightSensor Topic",\
        "rules": [\
            \{\
                "t": "change",\
                "p": "topic",\
                "pt": "msg",\
                "from": "topic",\
                "fromt": "msg",\
                "to": "RightSensor",\
                "tot": "str"\
            \}\
        ],\
        "action": "",\
        "property": "",\
        "from": "",\
        "to": "",\
        "reg": false,\
        "x": 217,\
        "y": 272,\
        "wires": [\
            [\
                "39032a55.255716",\
                "7a4fc5ec.fc77ec"\
            ]\
        ]\
    \},\
    \{\
        "id": "bc6dacb9.9dd52",\
        "type": "PCA9685 out",\
        "z": "311c8b43.5c0584",\
        "name": "Audio Power",\
        "pca9685": "84df5fdf.7962",\
        "channel": "4",\
        "payload": "",\
        "unit": "percent",\
        "onStep": "0",\
        "x": 869,\
        "y": 190,\
        "wires": []\
    \},\
    \{\
        "id": "1fbe5438.7b7bec",\
        "type": "inject",\
        "z": "311c8b43.5c0584",\
        "name": "Off",\
        "topic": "",\
        "payload": "0",\
        "payloadType": "num",\
        "repeat": "",\
        "crontab": "",\
        "once": false,\
        "onceDelay": "",\
        "x": 675,\
        "y": 213,\
        "wires": [\
            [\
                "bc6dacb9.9dd52"\
            ]\
        ]\
    \},\
    \{\
        "id": "901c239a.bea5e",\
        "type": "inject",\
        "z": "311c8b43.5c0584",\
        "name": "100%",\
        "topic": "",\
        "payload": "100",\
        "payloadType": "num",\
        "repeat": "",\
        "crontab": "",\
        "once": true,\
        "onceDelay": "",\
        "x": 676,\
        "y": 173,\
        "wires": [\
            [\
                "bc6dacb9.9dd52"\
            ]\
        ]\
    \},\
    \{\
        "id": "ebc381e2.2e3eb",\
        "type": "speakerpi-output",\
        "z": "311c8b43.5c0584",\
        "choose": "givenfile",\
        "filename": "/home/pi/Music/R2D2.wav",\
        "channels": "1",\
        "bitdepth": "8",\
        "samplerate": "11025",\
        "name": "R2D2",\
        "x": 501,\
        "y": 1145,\
        "wires": []\
    \},\
    \{\
        "id": "bf85e95d.22d5b8",\
        "type": "ui_button",\
        "z": "311c8b43.5c0584",\
        "name": "",\
        "group": "4f5830f7.70499",\
        "order": 2,\
        "width": 0,\
        "height": 0,\
        "passthru": false,\
        "label": "Play R2D2",\
        "color": "",\
        "bgcolor": "",\
        "icon": "",\
        "payload": "true",\
        "payloadType": "bool",\
        "topic": "",\
        "x": 240,\
        "y": 1144,\
        "wires": [\
            [\
                "ebc381e2.2e3eb"\
            ]\
        ]\
    \},\
    \{\
        "id": "c542a2ef.954a8",\
        "type": "speakerpi-output",\
        "z": "311c8b43.5c0584",\
        "choose": "givenfile",\
        "filename": "/home/pi/Music/LAZER.WAV",\
        "channels": "1",\
        "bitdepth": "8",\
        "samplerate": "11025",\
        "name": "Lazer",\
        "x": 501,\
        "y": 1198,\
        "wires": []\
    \},\
    \{\
        "id": "4069947d.8363ec",\
        "type": "ui_button",\
        "z": "311c8b43.5c0584",\
        "name": "",\
        "group": "4f5830f7.70499",\
        "order": 3,\
        "width": 0,\
        "height": 0,\
        "passthru": false,\
        "label": "Play Lazer",\
        "color": "",\
        "bgcolor": "",\
        "icon": "",\
        "payload": "true",\
        "payloadType": "bool",\
        "topic": "",\
        "x": 240,\
        "y": 1197,\
        "wires": [\
            [\
                "c542a2ef.954a8"\
            ]\
        ]\
    \},\
    \{\
        "id": "cc258492.685978",\
        "type": "speakerpi-output",\
        "z": "311c8b43.5c0584",\
        "choose": "givenfile",\
        "filename": "/home/pi/Music/starwars.wav",\
        "channels": "1",\
        "bitdepth": "8",\
        "samplerate": "11025",\
        "name": "StartWars",\
        "x": 499,\
        "y": 1419,\
        "wires": []\
    \},\
    \{\
        "id": "5e6199ed.a922f8",\
        "type": "ui_button",\
        "z": "311c8b43.5c0584",\
        "name": "",\
        "group": "4f5830f7.70499",\
        "order": 7,\
        "width": 0,\
        "height": 0,\
        "passthru": false,\
        "label": "Play Theme",\
        "color": "",\
        "bgcolor": "",\
        "icon": "",\
        "payload": "true",\
        "payloadType": "bool",\
        "topic": "",\
        "x": 228,\
        "y": 1418,\
        "wires": [\
            [\
                "cc258492.685978"\
            ]\
        ]\
    \},\
    \{\
        "id": "656ae780.cd2dc8",\
        "type": "ui_slider",\
        "z": "311c8b43.5c0584",\
        "name": "",\
        "label": "Volume",\
        "group": "4f5830f7.70499",\
        "order": 9,\
        "width": 0,\
        "height": 0,\
        "passthru": true,\
        "topic": "",\
        "min": 0,\
        "max": "100",\
        "step": 1,\
        "x": 194,\
        "y": 1525,\
        "wires": [\
            [\
                "76d238dc.143448"\
            ]\
        ]\
    \},\
    \{\
        "id": "c5be7a03.b9b148",\
        "type": "exec",\
        "z": "311c8b43.5c0584",\
        "command": "amixer cset numid=1 -- ",\
        "addpay": true,\
        "append": "",\
        "useSpawn": "false",\
        "timer": "",\
        "oldrc": false,\
        "name": "Volume Ctrl",\
        "x": 539.5,\
        "y": 1526.5,\
        "wires": [\
            [],\
            [],\
            []\
        ]\
    \},\
    \{\
        "id": "76d238dc.143448",\
        "type": "function",\
        "z": "311c8b43.5c0584",\
        "name": "Volume",\
        "func": "msg.payload/=3;\\nif (msg.payload>0) msg.payload+=66;\\nmsg.payload+=\\"%\\";\\nreturn msg;",\
        "outputs": 1,\
        "noerr": 0,\
        "x": 363,\
        "y": 1526,\
        "wires": [\
            [\
                "c5be7a03.b9b148"\
            ]\
        ]\
    \},\
    \{\
        "id": "bdc88586.7737a8",\
        "type": "speakerpi-output",\
        "z": "311c8b43.5c0584",\
        "choose": "givenfile",\
        "filename": "/home/pi/Music/imperial.wav",\
        "channels": "1",\
        "bitdepth": "8",\
        "samplerate": "11025",\
        "name": "StartWars",\
        "x": 498,\
        "y": 1470,\
        "wires": []\
    \},\
    \{\
        "id": "7aaa86ca.62b248",\
        "type": "ui_button",\
        "z": "311c8b43.5c0584",\
        "name": "",\
        "group": "4f5830f7.70499",\
        "order": 8,\
        "width": 0,\
        "height": 0,\
        "passthru": false,\
        "label": "Play Imperial",\
        "color": "",\
        "bgcolor": "",\
        "icon": "",\
        "payload": "true",\
        "payloadType": "bool",\
        "topic": "",\
        "x": 227,\
        "y": 1469,\
        "wires": [\
            [\
                "bdc88586.7737a8"\
            ]\
        ]\
    \},\
    \{\
        "id": "ccfd3eb.d4353c",\
        "type": "speakerpi-output",\
        "z": "311c8b43.5c0584",\
        "choose": "givenfile",\
        "filename": "/home/pi/Music/FATHER.WAV",\
        "channels": "1",\
        "bitdepth": "8",\
        "samplerate": "11025",\
        "name": "Father",\
        "x": 499,\
        "y": 1256,\
        "wires": []\
    \},\
...

This file has been truncated, please download it to see its full contents.

Credits

Julien Darrah

Julien Darrah

3 projects • 7 followers

Comments