uiflow: usocket module does not work if upload a sketch through the "download"
-
I have a problem: the usocket module does not work if upload a sketch through the "download" item in the uiflow IDE.
Here's an example of sketch:from m5stack import lcd
import usocket as socketlcd.clear()
lcd.setCursor(0, 0)
lcd.setColor(lcd.WHITE)try:
addr = socket.getaddrinfo('micropython.org', 80)[0][-1]
s = socket.socket()
s.connect(addr)
s.send(b'GET / HTTP/1.1\r\nHost: micropython.org\r\n\r\n')
data = s.recv(1000)
s.close()
lcd.println("OK\n")
lcd.print("Data len: " + str(len(data)))except:
lcd.print("Got Error!")If you upload by button with the triangle icon (looks like play) - it works, data received. If uploaded on the M5 through download - always fails.
-
@torabora what do you mean by doesn't work.
if you restart the m5stack, can you run the app from the app menu? -
@ajb2k3 The app starts after reboot M5 Fire, but the code is triggered in the exception block and displays message "Got Error!".
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login