The "waitDio" function suspend the program execution until the given pin status is high.
Note: the pin passed as argument can be both an input or an output.