Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/firebase/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用python在更新Firebase时触发数据_Python_Firebase_Arduino_Raspberry Pi - Fatal编程技术网

如何使用python在更新Firebase时触发数据

如何使用python在更新Firebase时触发数据,python,firebase,arduino,raspberry-pi,Python,Firebase,Arduino,Raspberry Pi,我想使用onupdate()触发器,每次都用python打印数据。我已经搜索了所有内容,但无法理解如何使用python实现onupdate()数据下面是我的代码。请任何人编辑代码并提供解决方案,以便我可以使用python打印每个更新的值 from firebase import firebase import serial firebase = firebase.FirebaseApplication('https://smartdoor-922ad.firebaseio.com/smartd

我想使用onupdate()触发器,每次都用python打印数据。我已经搜索了所有内容,但无法理解如何使用python实现onupdate()数据下面是我的代码。请任何人编辑代码并提供解决方案,以便我可以使用python打印每个更新的值

from firebase import firebase
import serial

firebase = firebase.FirebaseApplication('https://smartdoor-922ad.firebaseio.com/smartdoor-922ad',)
result = firebase.get('smartdoor-922ad/doorlock', '')
while True:

 print(result)