Search found 588 matches

by stijn
Wed Apr 07, 2021 7:58 am
Forum: General Discussion and Questions
Topic: Accessing /dev/ttyUSB0 from the micropython unix port
Replies: 5
Views: 168

Re: Accessing /dev/ttyUSB0 from the micropython unix port

I can access the bridge (from debian linux) via the usual device file /dev/ttyUSB0. Have you tried standard open("/dev/ttyUSB0") in MicroPython? If it's a driver where you can set baud rate etc on the diriver, that might just work, if you're lucky. Otherwise you'd be looking at porting the relevant...
by stijn
Wed Apr 07, 2021 6:09 am
Forum: General Discussion and Questions
Topic: Valgrind Results
Replies: 4
Views: 170

Re: Valgrind Results

Pretty sure you can just run valgrind on a 'normal' micropython build from the unix port? Assuming that reproduces the issue.
by stijn
Wed Apr 07, 2021 6:06 am
Forum: Programs, Libraries and Tools
Topic: [Solved] import stat failure
Replies: 6
Views: 292

Re: [Solved] import stat failure

Seems to follow standard Python import rules, so I don't think MicroPython should warn about it; it's just going to import the first one it sees and not even look further. It can be annoying though, and many many hours have been wasted on this (not just Python: it started with include files in C alr...
by stijn
Tue Apr 06, 2021 7:24 pm
Forum: General Discussion and Questions
Topic: Valgrind Results
Replies: 4
Views: 170

Re: Valgrind Results

Has been a while I used valgrind, but isn't the output you show a callstack? Which would mean there is actually only one warning, in gc_mark_subtree? And the line number of that one isn't shown (and it's perhaps also not the original implementation because it's from myTest.so and not from gc.c where...
by stijn
Mon Apr 05, 2021 6:47 am
Forum: ESP32 boards
Topic: Threads
Replies: 6
Views: 457

Re: Threads

Is the problem you're describing just having active threads in general, or rather the code which runs in the threads? Can you show the minimal code to reproduce this? For example: if you have a normal single-threaded application which works fine, then when that same application starts one thread whi...
by stijn
Tue Mar 30, 2021 6:13 pm
Forum: General Discussion and Questions
Topic: if statement short circuiting
Replies: 9
Views: 400

Re: if statement short circuiting

Fair point about Matlab. Funny, because I use it from time to time, but never looked at it that way. Nor realized it does short-circuit sometimes and sometimes doesn't. I just have to figure out a good way to emulate a case statement Hard to tell without actual code, but if it's really like one big ...
by stijn
Tue Mar 30, 2021 1:09 pm
Forum: Programs, Libraries and Tools
Topic: Porting Libraries important for Machine Learning to Micropython
Replies: 4
Views: 263

Re: Porting Libraries important for Machine Learning to Micropython

There's https://micropython-ulab.readthedocs.io/en/latest which implements core numpy functionality, but it's not really a port (depending on your definition of that): it's implemented from scratch, because numpy etc use the CPython object model which is very different from the MicroPython one. I do...
by stijn
Fri Mar 26, 2021 7:25 am
Forum: General Discussion and Questions
Topic: if statement short circuiting
Replies: 9
Views: 400

Re: if statement short circuiting

https://docs.python.org/3/library/stdty ... and-or-not so yes, supported.

Also wondering which languages (which are effectively in use) do not support short circuiting.
by stijn
Fri Mar 26, 2021 7:21 am
Forum: Raspberry Pi microcontroller boards
Topic: Is Micropython inherently multithreaded?
Replies: 7
Views: 493

Re: Is Micropython inherently multithreaded?

No MicroPython is singlethreaded by default. As in, the interpreter won't automatically distribute calculations over multiple threads (assuming that is what you are asking). it does not run to be twice as fast or anywhere near that That is not surprising. Expecting x threads to lead to execution tim...