Skip to content

Commit fe1276e

Browse files
committed
Merge remote-tracking branch 'origin/develop' into develop
2 parents 2d025e9 + 4c05284 commit fe1276e

11 files changed

+403
-43
lines changed
85.5 KB
Loading
Loading
Loading
1.67 MB
Loading
27.5 KB
Loading
Loading

node-red/README.md

Lines changed: 0 additions & 34 deletions
This file was deleted.

node-red/gpio-basic/README.md

Lines changed: 351 additions & 0 deletions
Large diffs are not rendered by default.

node-red/gpio-basic/flows.json

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
"id": "77a698253f4e0f3b",
44
"type": "tab",
5-
"label": "Flow 1",
5+
"label": "Arduino Cloud <-> GPIOs",
66
"disabled": false,
77
"info": "",
88
"env": []
@@ -118,7 +118,7 @@
118118
"repeat": "1",
119119
"crontab": "",
120120
"once": false,
121-
"onceDelay": 0.1,
121+
"onceDelay": "5",
122122
"topic": "",
123123
"x": 150,
124124
"y": 220,
@@ -202,7 +202,7 @@
202202
"name": "Link to Arduino Cloud Dashboard",
203203
"info": "https://app.arduino.cc/dashboards/25b90b8d-aba5-4414-9b4f-0a0f43778749",
204204
"x": 210,
205-
"y": 40,
205+
"y": 500,
206206
"wires": []
207207
},
208208
{
@@ -252,7 +252,7 @@
252252
"repeat": "5",
253253
"crontab": "",
254254
"once": false,
255-
"onceDelay": 0.1,
255+
"onceDelay": "5",
256256
"topic": "",
257257
"x": 150,
258258
"y": 100,
@@ -329,5 +329,35 @@
329329
"45efe7b0aee2a4a1"
330330
]
331331
]
332+
},
333+
{
334+
"id": "58df54993a68d0e7",
335+
"type": "comment",
336+
"z": "77a698253f4e0f3b",
337+
"name": "Periodic integer value sent to Arduino Cloud",
338+
"info": "",
339+
"x": 250,
340+
"y": 60,
341+
"wires": []
342+
},
343+
{
344+
"id": "7d011f726bbf42ee",
345+
"type": "comment",
346+
"z": "77a698253f4e0f3b",
347+
"name": "Read GPIO and send value to Arduino Cloud",
348+
"info": "",
349+
"x": 250,
350+
"y": 180,
351+
"wires": []
352+
},
353+
{
354+
"id": "2c56eb0de8394bc8",
355+
"type": "comment",
356+
"z": "77a698253f4e0f3b",
357+
"name": "Read LED status from Arduino Cloud and set GPIO",
358+
"info": "",
359+
"x": 270,
360+
"y": 300,
361+
"wires": []
332362
}
333363
]
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#! /bin/sh
2+
#
3+
# This is script must be used to launch Node-RED if you need to pre-configure
4+
# any of the GPIOs
5+
#
6+
7+
GPIOCHIP=4
8+
GPIOLINE=15
9+
10+
# Set the GPIO as pull-up
11+
/usr/bin/gpioget -B pull-up gpiochip${GPIOCHIP} ${GPIOLINE}
12+
13+
# Launch Node-RED
14+
SCRIPT_PATH="$(realpath $0)"
15+
NODE_RED_FOLDER="$(dirname $SCRIPT_PATH)"
16+
/usr/bin/node-red -v --userDir ${NODE_RED_FOLDER} --max-old-space-size=128
17+

node-red/gpio-basic/pm2.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22
"apps": [
33
{
44
"name": "node-red",
5-
"script": "node-red",
6-
// Change the directory to your own one
7-
"args": ["--userDir", "/home/dbeamon/projects/python/arduino-cloud/rpi-arduino-cloud/node-red/gpio-basic"],
8-
"node_args": ["--max-old-space-size=128"],
9-
// Other configurations...
5+
"script": "<FULL_PATH_TO_YOUR FOLDER>/pm2-node-red-start.sh"
106
}
117
]
128
}

0 commit comments

Comments
 (0)