Search found 15 matches

by efahl
Tue Aug 16, 2022 3:54 pm
Forum: Raspberry Pi microcontroller boards
Topic: Pico W Micro Python autorun of code even after reboot
Replies: 7
Views: 29351

Re: Pico W Micro Python autorun of code even after reboot

I've been using boot.py exclusively for like 6 years. I never thought there was any best practice on this, am I mistaken?
by efahl
Mon Sep 13, 2021 4:27 pm
Forum: General Discussion and Questions
Topic: MicroPython usage in medical devices?
Replies: 5
Views: 7499

Re: MicroPython usage in medical devices?

I'm recently retired from one of the big medical device manufacturing companies, where my group did Class I software in CPython (image analysis, pre-surgical planning for implants, that sort of thing). The company had more Class II/III devices than I could count, using embedded systems, and all of t...
by efahl
Sat Jul 10, 2021 3:24 pm
Forum: Programs, Libraries and Tools
Topic: Code not working on 1 board but fine on other two
Replies: 7
Views: 3203

Re: Code not working on 1 board but fine on other two

Just a shot in the dark here, but how are you powering the boards? I have a half dozen ESP8266s that are mostly identical, but one of them won't flash when powered from a marginal supply. If I plug it into a high amperage USB port it flashes fine, but when plugged into a sub-1-amp port on an ancient...
by efahl
Mon Jul 05, 2021 6:30 pm
Forum: General Discussion and Questions
Topic: How can I override BLE MTU? (or alternative solution)
Replies: 7
Views: 4943

Re: How can I override BLE MTU? (or alternative solution)

Yeah, the docs pretty clearly state that it's read-write, just like 'rxbuf', but I wonder if it's read-only in the ESP32 port? Did you try print(BLE.config('mtu')) to query the value?
by efahl
Sun Jul 04, 2021 2:42 pm
Forum: General Discussion and Questions
Topic: How can I override BLE MTU? (or alternative solution)
Replies: 7
Views: 4943

Re: How can I override BLE MTU? (or alternative solution)

Shouldn't mtu be a literal?

Code: Select all

BLE.config('mtu', 150)
by efahl
Thu Oct 18, 2018 2:48 pm
Forum: General Discussion and Questions
Topic: re.sub regex won't match
Replies: 10
Views: 6218

Re: re.sub regex won't match

Paul is saying that r'\n' and '\n' are completely different strings, which can be verified in any version of python.

r'\n' -> two-character string containing '\' and 'n'.
'\n' -> string containing a single newline character.

This is not a bug in r-strings, it is in fact the reason they exist.
by efahl
Wed Oct 03, 2018 2:46 pm
Forum: ESP8266 boards
Topic: os.listdir() garbage values.
Replies: 4
Views: 4762

Re: os.listdir() garbage values.

Corrupt file system?

Try:

Code: Select all

import uos
import flashbdev
uos.VfsFat.mkfs(flashbdev.bdev)
by efahl
Wed Aug 29, 2018 2:27 pm
Forum: Programs, Libraries and Tools
Topic: Matrix library for MicroPython
Replies: 33
Views: 33961

Re: Matrix library for MicroPython

Are you talking about 4x4 quaternion matrices? I found quaternions and 3D rotations to be fascinating but difficult so I haven't grasped all their aspects: pardon me if the previous question is ignorant. Either way this is very cool and neat to know, thanks for sharing :) No, 3x3 direction cosine m...
by efahl
Fri Aug 24, 2018 7:57 pm
Forum: Programs, Libraries and Tools
Topic: Matrix library for MicroPython
Replies: 33
Views: 33961

Re: Matrix library for MicroPython

Just an aside, what are you using these 3x3 matrices for? If they are 3D spatial transformations, then the matrix is orthonormal and its inverse is also its transpose. Our multibody dynamics code uses this to good advantage, and we have also added multiply_inverse and divide_inverse methods on the m...
by efahl
Sun Aug 12, 2018 3:17 pm
Forum: General Discussion and Questions
Topic: Are comments stripped out of code?
Replies: 4
Views: 3555

Re: Are comments stripped out of code?

What about docstrings? I'm too lazy to look at the microPython docs, but I know that with cPython the -OO command line option strips out docstrings, which otherwise eat up space in the bytecode, just wondering of uPy has similar options.