Search found 588 matches
- Wed Apr 07, 2021 7:58 am
- Forum: General Discussion and Questions
- Topic: Accessing /dev/ttyUSB0 from the micropython unix port
- Replies: 5
- Views: 166
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...
- Wed Apr 07, 2021 6:09 am
- Forum: General Discussion and Questions
- Topic: Valgrind Results
- Replies: 4
- Views: 168
Re: Valgrind Results
Pretty sure you can just run valgrind on a 'normal' micropython build from the unix port? Assuming that reproduces the issue.
- 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...
- Tue Apr 06, 2021 7:24 pm
- Forum: General Discussion and Questions
- Topic: Valgrind Results
- Replies: 4
- Views: 168
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...
- 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...
- Tue Mar 30, 2021 6:13 pm
- Forum: General Discussion and Questions
- Topic: if statement short circuiting
- Replies: 9
- Views: 397
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 ...
- Tue Mar 30, 2021 1:09 pm
- Forum: Programs, Libraries and Tools
- Topic: Porting Libraries important for Machine Learning to Micropython
- Replies: 4
- Views: 256
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...
- Tue Mar 30, 2021 11:12 am
- Forum: General Discussion and Questions
- Topic: logging to a log file with limited size
- Replies: 2
- Views: 139
Re: logging to a log file with limited size
This fork has the RotatingFileHandler: https://github.com/pfalcon/pycopy-lib/b ... andlers.py
- Fri Mar 26, 2021 7:25 am
- Forum: General Discussion and Questions
- Topic: if statement short circuiting
- Replies: 9
- Views: 397
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.
Also wondering which languages (which are effectively in use) do not support short circuiting.
- Fri Mar 26, 2021 7:21 am
- Forum: Raspberry Pi microcontroller boards
- Topic: Is Micropython inherently multithreaded?
- Replies: 7
- Views: 492
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...