Hello,
I have following code
String inputBuffer = "";
while (inputBuffer != "ok") {
inputBuffer = "";
while (Serial.available() > 0) {
char ch = Serial.read();
inputBuffer += ch;
delay (10);
This is the input() function that makes that other part of the code is realised when string 'ok' is written in serial monitor. How to achieve the same but not by writing anything, but by pressing a pushbutton?