I've successfully developed and deployed a Node-Red instance on a RPI3B+, and am controlling a rover via the GPIO pins. Unfortunately it is tedious to drive a rover with sliders via a browser; I'd like to 1). use the arrow keys on the keyboard or 2). use an X-Box controller. I've tried for two weeks to find a solution, and I'm hoping someone here can assist. I've tried many keyboard node offerings from the pallet, as well as the node-red-contrib-game_controllerizer suite of tools. Again, everything works just fine from the browser, I'm trying to control this device from a keyboard or controller on a distant end (i.e. the RPI is on the rover and moving around, and I'm logged into the browser on a phone or laptop, with a physical keyboard or controller).
[
{
"id": "280f2a0928a5e24e",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": ""
},
{
"id": "ddd82c7215917174",
"type": "rpi-gpio out",
"z": "280f2a0928a5e24e",
"name": "Steering",
"pin": "32",
"set": "",
"level": "0",
"freq": "100",
"out": "pwm",
"x": 560,
"y": 200,
"wires": []
},
{
"id": "3bf56581b14be4bd",
"type": "ui_slider",
"z": "280f2a0928a5e24e",
"name": "Steering",
"label": "Turn",
"tooltip": "",
"group": "f1774614ab0650b3",
"order": 3,
"width": 5,
"height": 1,
"passthru": true,
"outs": "all",
"topic": "topic",
"topicType": "msg",
"min": "16",
"max": "24",
"step": ".05",
"x": 360,
"y": 200,
"wires": [
[
"ddd82c7215917174"
]
]
},
{
"id": "fcca296080d599af",
"type": "rpi-gpio out",
"z": "280f2a0928a5e24e",
"name": "Throttle",
"pin": "36",
"set": false,
"level": "0",
"freq": "97",
"out": "pwm",
"x": 1040,
"y": 260,
"wires": []
},
{
"id": "4ce6d990f76a7fba",
"type": "ui_slider",
"z": "280f2a0928a5e24e",
"name": "Throttle Forward",
"label": "Forward",
"tooltip": "",
"group": "f1774614ab0650b3",
"order": 1,
"width": 1,
"height": 5,
"passthru": true,
"outs": "all",
"topic": "topic",
"topicType": "msg",
"min": "14.7",
"max": "18",
"step": ".05",
"x": 860,
"y": 200,
"wires": [
[
"fcca296080d599af",
"e881cdfe78376e37"
]
],
"icon": "font-awesome/fa-arrows-h"
},
{
"id": "760d0e535d0fb0a5",
"type": "ui_slider",
"z": "280f2a0928a5e24e",
"name": "Throttle Reverse",
"label": "Reverse",
"tooltip": "",
"group": "f1774614ab0650b3",
"order": 14,
"width": 1,
"height": 5,
"passthru": true,
"outs": "all",
"topic": "topic",
"topicType": "msg",
"min": "14.5",
"max": "10",
"step": ".05",
"x": 860,
"y": 320,
"wires": [
[
"fcca296080d599af",
"88a0f188b92e1ffb"
]
]
},
{
"id": "88a0f188b92e1ffb",
"type": "ui_gauge",
"z": "280f2a0928a5e24e",
"name": "Reverse Power",
"group": "f1774614ab0650b3",
"order": 8,
"width": 2,
"height": 2,
"gtype": "gage",
"title": "Reverse",
"label": "units",
"format": "{{value}}",
"min": "14.5",
"max": "10",
"colors": [
"#00b500",
"#e6e600",
"#ca3838"
],
"seg1": "",
"seg2": "",
"x": 1220,
"y": 400,
"wires": []
},
{
"id": "e881cdfe78376e37",
"type": "ui_gauge",
"z": "280f2a0928a5e24e",
"name": "Forward Power",
"group": "f1774614ab0650b3",
"order": 7,
"width": 2,
"height": 2,
"gtype": "gage",
"title": "Forward",
"label": "units",
"format": "{{value}}",
"min": "14.7",
"max": "18",
"colors": [
"#00b500",
"#e6e600",
"#ca3838"
],
"seg1": "",
"seg2": "",
"x": 1220,
"y": 120,
"wires": []
},
{
"id": "f1774614ab0650b3",
"type": "ui_group",
"name": "Truck",
"tab": "7dfab6ac996b6b2a",
"order": 1,
"disp": true,
"width": 24,
"collapse": false
},
{
"id": "7dfab6ac996b6b2a",
"type": "ui_tab",
"name": "Control",
"icon": "dashboard",
"disabled": false,
"hidden": false
}
]