Write to Pins

Sample code (from Shabaz) modified to write to a single pin.