Fixed bug in digitalRead
added masterSw keyword