You are reading a single comment by @billsalt and its replies. Click here to read the full conversation.
  • @Gordon It seems that the watch isn't reliably triggering on the 8uS pulse. I've got it going at a rate of about 222 kHz and trimmed the setWatch down to the following. I've verified that the pulse is present at the pin D16. Note that I am running the module and all of the IO pins at 1.8V.

    The setup code that uses SPI to communicate to the chip is operating properly (that sets up this signal), so I'm sure the supply voltage and IO is good.

    I stripped out all the other code and have it isolated to the setWatch function below.

    Could the issue be that the pulse on D16 is too short (8uS)?

    Output:

    setup complete
    interrupt init complete
    interval timer set
    watch set
    0
    6
    38
    20
    0
    0
    2
    0
    0
    0
    2
    0
    0
    0

    setInterval(function() {
      Bluetooth.println(readCount);
      readCount = 0;
     }, 1000);
    console.log("interval timer set");
    
    
    setWatch(function() {
        readCount++;
    }, D16, {repeat: true, edge:'falling', debounce: 0});
    console.log("watch set");
    
About

Avatar for billsalt @billsalt started