connect one one of microsw. to GND.. the other to pin 2 or 3 (UNO)
attach interrupt 0 (pin2) or 1 (pin3).
Now u can stop motor instantly when interupt is triggered.
connect one one of microsw. to GND.. the other to pin 2 or 3 (UNO)
attach interrupt 0 (pin2) or 1 (pin3).
Now u can stop motor instantly when interupt is triggered.