start:raspberry:nodered:python
Ceci est une ancienne révision du document !
Table des matières
Installation python dans node-red
installation de python-shell
sudo npm install node-red-contrib-python-shell
Installation d'un noeud Python-Fonction
sudo npm install node-red-contrib-python-function-ps --save
Usage
Comme le nœud de fonction, écrivez du code Python au lieu du code JavaScript et exécutez-le.
- exemple001.py
# user code here. a = 1234 node.globals["a"] = a del node.globals["a"] write_output("a", a) msg["payload"] = read_input("a") return msg
/home/chanteri/www/fablab37110/data/attic/start/raspberry/nodered/python.1738145111.txt.gz · Dernière modification : 2025/01/29 11:05 de admin