Open jhollowe opened 3 years ago
I have the same problem, but I add, when I upload the program the first time it works, but the next time I try to upload it does not run, I need to restart m5stack to be able to load a new program. This is a big problem for me, because I need to upload many times to debug my program.
Hi guys, might have a fix for that but I am about rewriting the whole from scratch...in a fork.
I d like to contact first the author of this extension to ask him few questions, I will let you know how it goes.
Fix coming soon
I got similar issue. I have tried on both windows 10 and macos 11.6. It only shows the main.py but every other file / folder I click will give me error / false. I am running the M5Stack-paper with UIFlow v1.8.7
darul75 - I am very looking forward to the fix, and thanks a lot.
@curdeveryday do you think there will be a new release soon?
@wacsy @jhollowe can you please give it a try with latest version v1.1.3 and let us know if that works for you now. thanks in advance.
@wacsy @jhollowe can you please give it a try with latest version v1.1.3 and let us know if that works for you now. thanks in advance.
Yes, I have tried it and it works prefect. Thank you very much.
But I got an error when I try to upload a png file to the img folder: Error running command m5stack.itemUpload: Communication error, sorry.. This is likely caused by the extension that contributes m5stack.itemUpload.
Any idea?
And I think there is some limitation of the communication. I got communication error if I want to draw 5 rectangles but 4 is ok by using M5Rect. I think I will go back to m5stack/M5EPD with PlatformIO for the time being. Just hope we can use python some day.
glad to hear you back about this initial issue, will investigate your upload failure with a png file and your second case which sounds pretty straightforward, would you mind sharing a piece of code with us?
@wacsy I think I found where the issue is coming for the image upload, probably a restriction on the device firmware about filenames, I will add some more details here shortly, fix should be pretty easy though.
glad to hear you back about this initial issue, will investigate your upload failure with a png file and your second case which sounds pretty straightforward, would you mind sharing a piece of code with us?
Great! M5stack kits are great products. I hope we can have brilliant software and documents for it as well. Here is the entire code I would like to try with vscode m5stack mpy
from m5stack import *
from m5ui import *
from uiflow import *
from m5mqtt import M5mqtt
from m5stack import touch
setScreenColor(15)
HTtimer = None
freCont = None
TXT = None
rectangle0 = M5Rect(84, 154, 150, 150, 15, 1)
rectangle1 = M5Rect(283, 154, 150, 150, 15, 1)
labelTitle = M5TextBox(145, 40, "Switches", lcd.FONT_DejaVu56, 0, rotate=0)
labTx = M5TextBox(58, 860, "Text", lcd.FONT_DejaVu24, 0, rotate=0)
ima_lamp = M5Img(95, 165, "res/lamp.png", True)
circle0 = M5Circle(439, 880, 50, 0, 0)
ima_proj = M5Img(294, 165, "res/projector.png", True)
labTy = M5TextBox(58, 905, "Text", lcd.FONT_DejaVu24, 0, rotate=0)
ima_temp = M5Img(102, 406, "res/temperature.png", True)
ima_hum = M5Img(294, 406, "res/humi.png", True)
lab_ttemp = M5TextBox(113, 553, "00.0", lcd.FONT_DejaVu40, 0, rotate=0)
lab_thum = M5TextBox(332, 553, "00", lcd.FONT_DejaVu40, 0, rotate=0)
label2 = M5TextBox(185, 860, "Text", lcd.FONT_DejaVu24, 0, rotate=0)
label0 = M5TextBox(185, 904, "Text", lcd.FONT_DejaVu24, 0, rotate=0)
m5mqtt = M5mqtt('m5p2', '192.168.0.1', 1883, 'username', 'password', 300)
HTtimer = 0
freCont = 0
lab_thum.setText(str("%.0f"%((sht30.humidity))))
lab_ttemp.setText(str("%.1f"%((sht30.temperature))))
lcd.show()
while True:
if touch.status():
labTx.setText(str(touch.read()[0]))
labTy.setText(str(touch.read()[1]))
if (touch.read()[0]) > 130 and (touch.read()[0]) < 210:
if (touch.read()[1]) > 200 and (touch.read()[1]) < 270:
if TXT == '0':
m5mqtt.start()
m5mqtt.publish(str('topic/control'),str('1'))
TXT = '1'
else:
m5mqtt.start()
m5mqtt.publish(str('topic/control'),str('0'))
TXT = '0'
label2.setText(str(TXT))
else:
label2.setText('out')
else:
label2.setText('out')
lcd.partial_show(40, 850, 220, 100)
freCont = freCont + 1
HTtimer = HTtimer + 2
if HTtimer > (5 * 60) * 1000:
lab_thum.setText(str("%.0f"%float((sht30.humidity))))
lab_ttemp.setText(str("%.1f"%float((sht30.temperature))))
HTtimer = 0
lcd.partial_show(110, 550, 280, 60)
freCont = freCont + 1
if freCont > 6:
freCont = 0
lcd.show()
wait_ms(2)
This is verified with the web page version of UIFlow (https://flow.m5stack.com/) and working correctly. But it shows the communication error when I using VSCode. So I started with some short codes to try:
from m5stack import *
from m5ui import *
from uiflow import *
from m5mqtt import M5mqtt
from m5stack import touch
setScreenColor(15)
HTtimer = None
freCont = None
TXT = None
rectangle0 = M5Rect(84, 154, 150, 150, 15, 1)
rectangle1 = M5Rect(283, 154, 150, 150, 15, 1)
rectangle2 = M5Rect(83, 254, 150, 150, 15, 1)
rectangle3 = M5Rect(83, 354, 150, 150, 15, 1)
lcd.show()
this one only draw 4 rectangles and it works, but if I add another M5Rect it will failed.
@wacsy I try your codes, it works in my M5Paper. Could you show your serial output or the communication error message?
@wacsy I try your codes, it works in my M5Paper. Could you show your serial output or the communication error message?
Sorry, my misstake was only copied the script to the main.py rather than creat a new one under apps folder. Now it is working correctly. Thank you very much.
The png image can be uploaded to res folder with an error:
And the UI is frozen, do you have any solution, please?
Do I need to find a serial sniffer on this, please? The VSCode doesn't give me any useful information about the communication error. Or does it have some log I can check, please?
Extension version: 1.0.9
VSCode About Info:
When attempting to do some actions (refresh the file tree listing, upload file, delete file, etc), the following error is presented and the file tree breaks. To fix it, you must deselect the COM and reselect the COM.
Saving a file, reading files, and "Run in M5Stack" all work without the error.