Implement digital input trigger functions
Add counter example