Hi,
I am using M5Stick C and have put together a blocky which is a simple http GET process.
i.e. connect to WiFi and send data via GET.
The Data (Key&Value) is populated and the solution successfully sends to the correct URL but...
No data is being included in the URL sent.
On checking the Python code, the data is not added.
Is this a bug?
Python code generated via Blocky is below and I can provide .m5f if required.
Thanks
Ian
from m5stack import *
from m5ui import *
from uiflow import *
import wifiCfg
import urequests
setScreenColor(0x111111)
wifiCfg.doConnect('XXXXXXXX', 'XXXXXXXXX')
label0 = M5TextBox(0, 16, "Text", lcd.FONT_Default, 0xFFFFFF, rotate=0)
label1 = M5TextBox(0, 55, "Text", lcd.FONT_Default, 0xFFFFFF, rotate=0)
if wifiCfg.wlan_sta.isconnected():
label1.setColor(0x3333ff)
label1.setFont(lcd.FONT_DejaVu18)
label1.setText('connected')
try:
req = urequests.request(method='GET', url='http://URL.com/insertGet.php', headers={})
label1.setText('SENT')
label0.setColor(0x33ff33)
label0.setFont(lcd.FONT_DejaVu18)
label0.setText(str(req.status_code))
except:
pass
else:
label1.setColor(0xff0000)
label1.setText('NOT SENT')