You are reading a single comment by @Oscar and its replies. Click here to read the full conversation.
  • Both boards (MDBT42Q and Adafruit touch sensor) have common ground.
    I use power from a USB power supply (5V) to feed the MDBT42Q, then I use the output of the voltage regulator at 3.3V from the MDBT42Q to feed the Adafruit touch sensor, so that the sensor outputs 3.3V logic.

    Voltage between Vcc and GND on the touch sensor is 3.3V (as expected).
    Voltage between OUT and GND on the touch sensor is 3.22V (just slightly lower).

    This OUT voltage gets sensed as HIGH on my other microcontroller boards using CircuitPython and 3.3V logic. However, then connecting OUT to pin D25 or pin D28, touching the sensor (thus 3.22V) and having said pins pulled down (L2 of snippet1), digitalRead(pin) returns 0. In the case of D28, I can also try an analogRead(D28) and it returns 0.97, which means that the pin "sees" the voltage.

    In summary:
    I have a "high" signal from the touch sensor being 3.22V.
    Said signal gets read by an analog pin as being 0.97 but... when I do a digital read I get zero.

    Is this expected?

    Answers to #9:
    -both boards have common ground;
    -voltage between OUT and GND when the sensor is not touched is obviously 0V;
    -push button replacing the cap sensor works, as the "out" pin of the push button when pushed outputs 3.3V (and not 3.2V); that is, the associated pin of the MDBT42Q board senses correctly HIGH and LOW; no external resistance is used, as the pin on the MDBT42Q is pulled down;
    -setInterval with digitalRead would have the same problem as setWatch, my problem is that I can't detect the "high" using digitalRead.

    Thanks again for all the replies!


Avatar for Oscar @Oscar started