The Particle Photon is on a breadboard with USB power directly from a computer. Running the code below to test digitalRead–does it always provides either 0 or 1. It appears to be very unreliable giving the result -1515870811 many times.
Physically, I am just moving a jumper wire between D0 and either 3V3 or ground.
This result is obtained by pulling the value using “particle get xxxx status” using the CLI.
Is this expected behavior? If it is expected, is the problem with the reliability of the digitalRead or does something happen to the result during the transfer to the cloud. Any suggestions to get around the “non-boolean” result will be greatly appreciated.