Firebase library: https://github.com/vishal-android-freak ... thon-esp32
Code:
Code: Select all
import network
import ufirebase as firebase
from time import sleep
URL = 'https://xxxxxxxxxxxxxxxx.firebaseio.com/'
wlan = network.WLAN(network.STA_IF)
if not wlan.active() or not wlan.isconnected():
wlan.active(True)
print('connecting to: xxxx')
wlan.connect('xxxx', 'xxxxxxxxx')
while not wlan.isconnected():
pass
print('network config:', wlan.ifconfig())
datas = {'Shape': {'hos': 'fse', 'xxe': 'ter'}, 'Wps': 'Wps'}
firebase.put(URL, datas)
sleep(5)
print(firebase.get(URL))
Error:
Code: Select all
Traceback (most recent call last):
File "main.py", line 21, in <module>
File "ufirebase.py", line 124, in get
File "urequests.py", line 116, in get
File "urequests.py", line 62, in request
OSError: [Errno 12] ENOMEM
MicroPython v1.18 on 2022-01-17; 4MB/OTA module with ESP32
Type "help()" for more information.