Search found 29 matches

by laukejas
Fri Nov 20, 2020 5:53 pm
Forum: General Discussion and Questions
Topic: Using webrepl instead of USB connection with Thonny IDE
Replies: 24
Views: 15044

Re: Using webrepl instead of USB connection with Thonny IDE

aivarannamaa wrote:
Fri Nov 20, 2020 5:42 pm
laukejas wrote:
Fri Nov 20, 2020 5:02 pm
Perhaps this functionality could be something you might consider for the future versions of Thonny, if it's not too difficult to implement?
I added this to my TODO list: https://github.com/thonny/thonny/issues/1439
Awesome, thank you very much!
by laukejas
Fri Nov 20, 2020 5:02 pm
Forum: General Discussion and Questions
Topic: Using webrepl instead of USB connection with Thonny IDE
Replies: 24
Views: 15044

Re: Using webrepl instead of USB connection with Thonny IDE

Pressing "Open system shell" opens the shell, but I don't think WebREPL is running. All I'm seeing is plain command line, waiting for regular inputs, not like WebREPL. Am I missing some dependency or something? Oops, I forgot that we were talking about WebREPL. In this case I can't offer any work-a...
by laukejas
Fri Nov 20, 2020 3:24 pm
Forum: General Discussion and Questions
Topic: Using webrepl instead of USB connection with Thonny IDE
Replies: 24
Views: 15044

Re: Using webrepl instead of USB connection with Thonny IDE

I don't fully understand everything that you guys here discussed, so I'm kind of unsure - so, what is the best way to go around sending direct keystrokes via Thonny to ESP? Unfortunately there is no way for it. What you can do is * use Thonny for saving your code to main.py * select "Tools => Open ...
by laukejas
Thu Nov 19, 2020 10:14 pm
Forum: General Discussion and Questions
Topic: Using webrepl instead of USB connection with Thonny IDE
Replies: 24
Views: 15044

Re: Using webrepl instead of USB connection with Thonny IDE

The characters get sent directly. This is what allows things like tab completion to work on the REPL. Indeed. I never thought about tab-completion and arrow up/down, but now I understand that it must work like this. I assume you mean sys.stdin.read though? Yes, my mistake. How does Thonny avoid the...
by laukejas
Sat Nov 14, 2020 7:51 pm
Forum: General Discussion and Questions
Topic: Using webrepl instead of USB connection with Thonny IDE
Replies: 24
Views: 15044

Re: Using webrepl instead of USB connection with Thonny IDE

Nope, Thonny's Shell does not support capturing keystrokes. Actually, I don't see how you could capture keystrokes in MicroPython even if you were using a proper terminal emulator. > Far fewer exceptions that in the previous build I tried Do you mean misbehaviors of Thonny? Please report them at ht...
by laukejas
Sat Nov 14, 2020 6:15 am
Forum: General Discussion and Questions
Topic: Listening for keypress/keydown over WebREPL
Replies: 3
Views: 4309

Re: Listening for keypress/keydown over WebREPL

Thanks, jimmo, but how exactly do I get this to work? I tried running the first script you provided via Thonny in WebREPL mode, then went to the console, and tried pressing 'a', key, but the command does not get executed. Here is a screenshot: https://i.imgur.com/8zcVEND.png Did I misunderstand how ...
by laukejas
Fri Nov 13, 2020 8:24 pm
Forum: General Discussion and Questions
Topic: Listening for keypress/keydown over WebREPL
Replies: 3
Views: 4309

Listening for keypress/keydown over WebREPL

Hi, I am building a ESP8266-based robot for learning SLAM, and I also want to be able to control it manually over WiFi. I can send commands over WebREPL to initialize various movement commands (move for certain duration, rotate, etc.), but it is not convenient, because I have to press Enter after ev...
by laukejas
Fri Nov 13, 2020 6:16 pm
Forum: General Discussion and Questions
Topic: Using webrepl instead of USB connection with Thonny IDE
Replies: 24
Views: 15044

Re: Using webrepl instead of USB connection with Thonny IDE

I just released the next beta of Thonny 3.3, which should work much better with WebREPL: https://github.com/thonny/thonny/releases/tag/v3.3.0b7 Looking forward to your feedback! It's great. Far fewer exceptions that in the previous build I tried. Amazing software. I do have a question. Is it possib...
by laukejas
Thu Oct 22, 2020 3:01 pm
Forum: General Discussion and Questions
Topic: Using webrepl instead of USB connection with Thonny IDE
Replies: 24
Views: 15044

Using webrepl instead of USB connection with Thonny IDE

Hi, After trying out nearly a dozen IDE's, I've finally settled for Thonny. Seems really great for small to medium projects with MicroPython and my ESP8266. Only thing is, having USB cable plugged in during development is extremely inconvenient, especially with moving projects (robots and such). How...
by laukejas
Fri Apr 03, 2020 6:42 pm
Forum: General Discussion and Questions
Topic: Getting the size of an object in MicroPython
Replies: 7
Views: 9213

Re: Getting the size of an object in MicroPython

Arrays and bytearray objects store their data in contiguous locations. In the cases where it matters (large numbers of elements) you can calculate it. There is doubtless a small amount of overhead, but if you issue a = array('H', (0 for _ in range(1000)) the RAM usage will be 2000 bytes plus a few ...