• Hi,

    I'm workin on a project.
    I need to scan 8 external buttons.
    Therefore I use the setWatch function.
    But it looks like the Espruino can't handle 8 setWatch functions.
    If I disable (make a comment of it) a few setWatch, then it is working fine for these buttons.

    The pins I used are C7, C8, C9, C10, C11, A8, A9 ad A10
    Tis is the setWatch line

      setWatch(visitorScoreUp, A9, {repeat: true, edge: 'falling', debounce: 300});
    

    The other pin of the button is connected to the GND

    Regards
    Peter

  • Fri 2019.08.09

    Hello Peter. I see you are a recent forum poster. Welcome to the world of Espruino!

    There are too many questions here to answer accurately, such as which board, which version of Espruino, what is function visitorScoreUp() doing, how are the setWatch() functions initialized, etc.

    Many of us would like to assist with our time gratis, but please follow the forum post instructions at:

    http://forum.espruino.com/microcosms/130­/

    so that we may be able to assist you here. Although I don't see a documentation comment that would limit the number, it most likely is in the way the setWatch() functions are being set up.

  • That is a limitation of the microcontroller:

    You can't setWatch on two pins with the same number (eg. A5 and C5) - this is a limitation of the STM32F1

    From the Known problems section in the Original Espruino Board's docs.

About

Avatar for PeterD @PeterD started