Removed pin.flip() because this is wrong. (value only changes for input direction)
Code cleanup + bug fix.
Added better usage examples and filled API section of README.md