Digital pins don't work as inputs until pinMode is called
technoblogy opened this issue · 0 comments
technoblogy commented
As stated in the Maixduino documentation:
Only pins that are set to the input function by pinMode() can be read.
This is different from the standard Arduino behaviour. Why don't you incorporate a call to:
pinMode(pin, INPUT);
in the digitalRead() function? This would then make the behaviour consistent.