I want to read a GPIO pin on a Raspberry Pi, but I didn't have any luck trying to read the device file (as per this this thread) so I thought I would try it another way.
I wrote a small script in python that reads the GPIO pin and then writes any events to a log file.
The format of my log file is like this:
2015-05-24 19:31:03,705 INFO CLOSED 2015-05-24 19:29:48,691 INFO OPEN 2015-05-24 19:29:52,053 INFO CLOSED 2015-05-24 19:29:53,094 INFO OPEN
Is there any way to get the ASCII file data source to read the 'CLOSED' and 'OPEN' events plus the timestamp?
I have tried, I think, dozens of combinations of regex expressions!