I want to ask questions the device like switch , led, motor they have two terminal (positive terminal and negative terminal ) when we interface with controller why we use only single pin like we say switch is connected PO.1 or led is connected P1.1
I have simple task I have one switch and one motor. the positive edge of switch is connected to port pin PO.1 and negative edge is connected to port pin PO.2 and motor is connected to output the positive edge of motor is connected to port pin P1.1 and negative edge is connected to P1.2
if switch is on then motor is on
if switch is of then motor is of
I am having problem to write code someone please give me idea
I have simple task I have one switch and one motor. the positive edge of switch is connected to port pin PO.1 and negative edge is connected to port pin PO.2 and motor is connected to output the positive edge of motor is connected to port pin P1.1 and negative edge is connected to P1.2
if switch is on then motor is on
if switch is of then motor is of
I am having problem to write code someone please give me idea