• So you're saying that even without analogRead, you can't use D0?

    For analogRead, I think this would be an issue on any board - internally, the pin can only be connected to one peripheral at a time - eg, SPI, I2C, Serial, GPIO, or Analog.

    So you've got it set to digital input for setWatch, but then when you read the analog value with analogRead, the pin is disconnected from the input and turned into an analog input - which is probably what causes the state change for the watch.

    As @allObjects says you might be able to force it with pinMode, but it's quite possible that analogRead won't work on the pin after that

About

Avatar for Gordon @Gordon started