pyb.LED(LED_GREEN).toggle()
On a single channel, the code is just looking for the logic on the pin to change and then it records the time. The reader can see the use of the print statement and that for visual confirmation and LED is toggled. There is a ton though that can be used with this technique across multiple channels without much effort at all.
Tip #3 – Capture Data in a Terminal
It is common practice to actually record the incoming data somewhere and the most natural place is to use a terminal. Using Linux or a Mac terminal, it’s easy to open the communication port and just redirect the incoming contents to a file for processing later. However, on Windows there isn’t really a terminal that is built in that can do this. However, there are several options available to developers.