2 ms·
> void setup(){ pinMode(PWRBTN, INPUT); } > void press(){ digitalWrite(PWRBTN, HIGH); delay(33); digitalWrite(PWRBTN, LOW); delay(33); digitalWrite(PWRBTN, HIG
by numpad0 4y ago
> void setup(){ pinMode(PWRBTN, INPUT); }
> void press(){ digitalWrite(PWRBTN, HIGH); delay(33); digitalWrite(PWRBTN, LOW); delay(33); digitalWrite(PWRBTN, HIGH); }
My 5min hack would look like this - and optionally a 0.1uF and a 1k resistor for peace of mind - totally untested though. Usually a uC I/O pin has three states; output high, output low and Hi-Z. Hi-Z is high-impedance or extremely high resistance state, analogous to an open circuit.
- dekhn 4y agoRight, just toggling a GPIO. From what I can tell, there is some claim of 5V 500mA for a short period when doing this, which would explain the transistor.