Search found 1235 matches

by jimmo
Mon Dec 16, 2019 1:48 am
Forum: Programs, Libraries and Tools
Topic: How to eval bytecode from network?
Replies: 10
Views: 532

Re: How to eval bytecode from network?

If all else fails, there is a new example in the docs of how to make a filesystem in RAM: http://docs.micropython.org/en/latest/reference/filesystem.html#custom-block-devices And here is an example from late last week on how to do exactly this (load an ephemeral .mpy file) -- https://github.com/mic...
by jimmo
Mon Dec 16, 2019 1:46 am
Forum: Development of MicroPython
Topic: uos docs: the abstract block device SOLVED
Replies: 4
Views: 448

Re: uos docs: the abstract block device SOLVED

Thanks, I agree this could do with a better explanation -- sent https://github.com/micropython/micropython/pull/5421
by jimmo
Mon Dec 16, 2019 1:33 am
Forum: ESP8266 boards
Topic: I have a problem when i download my code
Replies: 2
Views: 163

Re: I have a problem when i download my code

MicroPython only runs main.py at startup.

When you click the run button in uPyCraft, it runs blink.py for you, but on startup you have to tell it.

The easiest thing to do is add "import blink" to the top of main.py.
by jimmo
Thu Dec 12, 2019 11:49 am
Forum: General Discussion and Questions
Topic: store config/settings...
Replies: 9
Views: 366

Re: store config/settings...

I highly recommend your third option -- write out your config as Python (using `repr` helps here) and load it directly by importing.
by jimmo
Thu Dec 12, 2019 2:58 am
Forum: ESP32 boards
Topic: MicroPython Startup Time
Replies: 26
Views: 1914

Re: MicroPython Startup Time

So where did the 150us come from? Could it be that Damien made a mistake and nobody thought to question it or double check it? OK, so the web site is wrong. Perhaps someone should update it. I suspect that the quote on the website is measuring MicroPython itself. i.e. the time taken from when the f...
by jimmo
Wed Dec 11, 2019 3:04 am
Forum: General Discussion and Questions
Topic: littlefs - advantages & disadvantages
Replies: 30
Views: 2209

Re: littlefs - advantages & disadvantages

I think v1 support is there mostly for people who wanted to migrate existing / devices that were using v1 for whatever purpose or had some specific reason for using it. But that's why support for it isn't compiled in by default.
by jimmo
Wed Dec 11, 2019 2:58 am
Forum: micro:bit boards
Topic: pin digital_read
Replies: 9
Views: 790

Re: pin digital_read

I went looking through my notes from a summer school I used to teach at -- https://github.com/jimmo/ncss-embedded/blob/master/chapters/7-bitbot-neopixels.md This is specifically about using the bit:bot with the micro:bit and MicroPython. There's a code snippet at the end: from microbit import * impo...
by jimmo
Wed Dec 11, 2019 2:42 am
Forum: General Discussion and Questions
Topic: function int.from_bytes Different results
Replies: 1
Views: 143

Re: function int.from_bytes Different results

MicroPython doesn't currently support the "signed" parameter to from_bytes. In the code for from_bytes it says: // TODO: Support signed param (assumes signed=False at the moment) (void)n_args; So it matches the CPython behavior if you set signed=False (which probably isn't what you want). However, t...
by jimmo
Wed Dec 11, 2019 2:35 am
Forum: General Discussion and Questions
Topic: Can A ESP32 Masquerade As A Bluetooth Headset?
Replies: 3
Views: 247

Re: Can A ESP32 Masquerade As A Bluetooth Headset?

Worth mentioning though -- to answer your specific question, yes the ESP32 can do this right now if you write C code against the IDF using Bluedroid. So given that all you want to do is pretend to be a non-functional HFP profile device, it might be quite straightforward to adapt one of the IDF examp...
by jimmo
Wed Dec 11, 2019 2:33 am
Forum: General Discussion and Questions
Topic: Can A ESP32 Masquerade As A Bluetooth Headset?
Replies: 3
Views: 247

Re: Can A ESP32 Masquerade As A Bluetooth Headset?

I'm fairly sure this requires Bluetooth Classic, not BLE. That UUID is the Hands Free Profile (which is part of BT Classic). Not to be confused with a BLE Service UUID. It would be great to support BT Classic on ESP32 and STM32 -- I replied to a query about this on GitHub recently https://github.com...