Search found 39 matches

by ltmerlin
Thu Nov 05, 2020 4:29 pm
Forum: General Discussion and Questions
Topic: Using uasyncio.Event in an interrupt handler or no go
Replies: 5
Views: 567

Re: Using uasyncio.Event in an interrupt handler or no go

@kevinkk525 indeed! Thanks for correcting the example snippet. It should be something like this:

Code: Select all

async def poll():
    while True:
        if MCP.read_pin():
            print("Pin changed state.")
        await uasyncio.sleep_ms(10)
by ltmerlin
Thu Nov 05, 2020 1:13 pm
Forum: General Discussion and Questions
Topic: Using uasyncio.Event in an interrupt handler or no go
Replies: 5
Views: 567

Re: Using uasyncio.Event in an interrupt handler or no go

OK thanks for the information, Peter. Since I am working on an ESP32, polling it is.

So a simple asyncio polling task works:

Code: Select all

async def poll():
    while True:
        if MCP.read_pin():
            print("Pin changed state.")
by ltmerlin
Wed Nov 04, 2020 3:14 pm
Forum: General Discussion and Questions
Topic: Using uasyncio.Event in an interrupt handler or no go
Replies: 5
Views: 567

Using uasyncio.Event in an interrupt handler or no go

For my project I am using a MCP23008 GPIO expander (over I2C). I want to use the MCP23008 interrupt pin that tells me that some pin changed state. Since I am building a uasyncio application I was wondering how to readout this interrupt "event". Can I set an uasyncio.Event in a irq handlert? Or shoul...
by ltmerlin
Wed Nov 04, 2020 3:04 pm
Forum: Other Boards
Topic: [SAMD21] - SPI/I2C support
Replies: 2
Views: 461

Re: [SAMD21] - SPI/I2C support

OK that's a start. Thanks.
by ltmerlin
Mon Nov 02, 2020 3:36 pm
Forum: Other Boards
Topic: [SAMD21] - SPI/I2C support
Replies: 2
Views: 461

[SAMD21] - SPI/I2C support

Has anyone got SPI or I2C working on a SAMD21? The samd21 port is very limited with no built-in SPI/I2C support. Even a machine.Pin is not available… I know there is CircuitPython, but I would like to have standard Micropython on it... CircuitPython uses its own adafruit_bus_device and busio librari...
by ltmerlin
Mon Jul 27, 2020 12:37 pm
Forum: General Discussion and Questions
Topic: Generating autodocs for upython
Replies: 6
Views: 1022

Re: Generating autodocs for upython

I got the following error: mkdocstrings.handlers.CollectionError: module 'lib' has no attribute 'helpers' I added my lib dir which contains a helpers.py file which I want to document, but it does not seem to find it. docs/helpers.md ## Documentation for Helper ::: lib.helpers mkdocs.yml - mkdocstrin...
by ltmerlin
Mon Jul 27, 2020 8:37 am
Forum: General Discussion and Questions
Topic: Generating autodocs for upython
Replies: 6
Views: 1022

Re: Generating autodocs for upython

Hi pawamoy, thanks for the hint!
by ltmerlin
Tue Jun 09, 2020 1:31 pm
Forum: General Discussion and Questions
Topic: Generating autodocs for upython
Replies: 6
Views: 1022

Re: Generating autodocs for upython

Thanks for your answer. That works great with Sphinx!
It would also be nice to be able to do this using MkDocs. I did not found a way yet. Keep you posted.
by ltmerlin
Sat Jun 06, 2020 7:37 pm
Forum: General Discussion and Questions
Topic: Generating autodocs for upython
Replies: 6
Views: 1022

Generating autodocs for upython

Is there a way to generate auto docs from upython code like we normally do with python? Using Sphinx auto docs or mkdocstrings is not working as standard python is used to import the modules to be documented. This leads to some issues if some modules are not importable (such as "import machine")... ...
by ltmerlin
Sat Jun 06, 2020 7:26 pm
Forum: MicroPython pyboard
Topic: How to properly increase FLASH_FS on pyboardv11?
Replies: 13
Views: 3660

Re: How to properly increase FLASH_FS on pyboardv11?

Ok that makes sense!
Thanks for you reply. Your suggestions work and indeed when filling the FS with my first suggested build settings it does really strange things :D