I was hoping to use D7 to attach an interrupt triggered by a button which pulls LOW. Thus, I set the pin up as follows:
int BtnPin = D7;
However, using a multimeter, I have verified D7 is at 2.4V rather than the expected 3-3.3V. Since my button pulls LOW, the interrupt is never firing since it is always LOW. Am I missing something? I have verified this is the case both when the Electron is and isn’t connected to my external/custom PCB.
The only other relevant piece of information I can think of is I have removed the 0 ohm resistor and have connected VBAT to a 3V CR2032 battery.
If you have the pull-up applied you apply 3.3V to the anode of the on-board LED which will “open” (made obvious by being dimly lit) and hence connect to GND where you then see the effect of the voltage divider (3.3V -> 40k pull-up -|-> LED -> current limiting resistor -> GND).
In the Photon documentation, there is a schematic for “User I/O”. As @ScruffR states, there is already a resistor and LED attached to D7, so when you add the internal pull-up, you are seeing a voltage divider effect on the pin. However, from the electrical specifications, by my math, a logical low would have to be 1.164V or lower. At 2.4V, it should register as a logical high because the minimum voltage to register a “high” is 1.833V.
IMHO, I think it would be much easier to use another pin for active low interrupts and reserve D7 for only active high interrupts.
Photon I/O Characteristics:
Edit: sorry, just hit me, you are using an Electron. However, the Electron I/O characteristics are the same.
Electron I/O Characteristics: