• Short question:
    I have a MDBT42Q breakout board, driven by 7,2 V (Li-Ion 2S) and a Chinese button with builtin LED + resistor(?) that is rated for 12 V and below 2 mA at my voltage.

    So I thought the simplest way to run this LED from a port is:

    • connect LED+ to Vin
    • connect LED- to my port (D15 in this case)
      and use pinMode(D15, "opendrain") and inverse logic (0 to light, 1 to clear the LED).

    But the LED is lit always (a bit dimly) and only changes brightness when I do D15.set() or D15.reset().
    I have tried any other pinMode too and it always lights up, never goes completely dark.

    I would try to avoid any additional components like transistors if possible since I have gotten away without so far in this project and have just to wire up the board somehow to buton and a servo motor.
    However, 3,3 V seems not to be enough to light the LED and that's why I came up with the opendrain thing to run it of the (higher) battery voltage.

    What am I doing wrong?


Avatar for ChristianW @ChristianW started