The plot is thicking or I'm, like AI, hallucinating.
I'm running a bare minimum firmware (see below) that only reads inputs D4 and A5.
On both an Argon and Photon2, the inputs read 3v3 and 0.71v respectively on HIGH and LOW.
On the Argon both inputs read fine:
0000025025 [app] INFO: input1 D4=1, input2 A5=1
0000026026 [app] INFO: input1 D4=0, input2 A5=1
0000027027 [app] INFO: input1 D4=0, input2 A5=1
0000028028 [app] INFO: input1 D4=1, input2 A5=1
0000029029 [app] INFO: input1 D4=1, input2 A5=1
0000030030 [app] INFO: input1 D4=1, input2 A5=0
0000031031 [app] INFO: input1 D4=1, input2 A5=0
0000032032 [app] INFO: input1 D4=1, input2 A5=0
0000033033 [app] INFO: input1 D4=1, input2 A5=1
But on a Photon2, the firmware sees only input D4 changing, but NOT A5:
0000133101 [app] INFO: input1 D4=0, input2 A5=1
0000134102 [app] INFO: input1 D4=0, input2 A5=1
0000135103 [app] INFO: input1 D4=0, input2 A5=1
0000136104 [app] INFO: input1 D4=1, input2 A5=1
0000137105 [app] INFO: input1 D4=1, input2 A5=1
0000138106 [app] INFO: input1 D4=1, input2 A5=1
0000139107 [app] INFO: input1 D4=1, input2 A5=1
Note: this is not a problem about switching speeds since I am doing the on off manually with a wire.
What could be wrong here?
Thanks!
Firmware:
#include "Particle.h"
SYSTEM_MODE(AUTOMATIC);
SerialLogHandler logHandler(LOG_LEVEL_INFO);
void setup()
{
pinMode(D4, INPUT);
pinMode(A5, INPUT); // trying D14 here did not make a difference
}
void loop()
{
// read the input every second
static unsigned long lastTime = 0;
if (millis() - lastTime > 1000)
{
lastTime = millis();
int input1 = digitalRead(D4);
int input2 = digitalRead(A5);
Log.info("input1 D4=%d, input2 A5=%d", input1, input2);
}
}