adafruit / circuitpython

CircuitPython - a Python implementation for teaching coding with microcontrollers
https://circuitpython.org
Other
4.1k stars 1.22k forks source link

pulseio interferes with the display of the matrixportal #3685

Open diegomoise1 opened 3 years ago

diegomoise1 commented 3 years ago
import displayio
import framebufferio
import rgbmatrix
import terminalio
import pulseio
displayio.release_displays()

matrix = rgbmatrix.RGBMatrix(
    width=64, bit_depth=4,
    rgb_pins=[
        board.MTX_R1,
        board.MTX_G1,
        board.MTX_B1,
        board.MTX_R2,
        board.MTX_G2,
        board.MTX_B2
    ],
    addr_pins=[
        board.MTX_ADDRA,
        board.MTX_ADDRB,
        board.MTX_ADDRC,
        board.MTX_ADDRD
    ],
    clock_pin=board.MTX_CLK,
    latch_pin=board.MTX_LAT,
    output_enable_pin=board.MTX_OE
    )
display = framebufferio.FramebufferDisplay(matrix)
#display starts blinking right here
pulses = pulseio.PulseIn(board.A1, maxlen=200, idle_state=True)

I am trying to get my board to receive an IR code, but as soon as a pulseio object gets declared the display starts blinking. My code is longer than what I have here but using just what I put here in the terminal I can get it to start blinking so it has nothing to do with the rest of my code. I am not sure if this is limited to the Matrixportal or if the same happens with other display or boards. Edit: Things I have tried: using deinit(), does nothing using with pulseio.PulseIn(board.A1, maxlen=200, idle_state=True) as pulses does nothing creating the object in another file does work but the IR code is not received, instead it throws the code took too long exception from irremote.py

tannewt commented 3 years ago

@jepler Does this make you think of anything suspicious?

diegomoise1 commented 3 years ago

Should I be scared that this is marked as a Long term milestone...?

tannewt commented 3 years ago

It is not a high priority for us. If it's something obvious to someone who sees the issue, then we'll fix it. Otherwise, it'll have to wait until someone can look deeper into it.

Let us know if you'd like to help debug it.