Fixed call to writeByte in togglePin
Added block to demonstrate pin toggling