Implement digital-read

The switch example is now working!