Hello Arduino community,
I am working with the ISR on the Arduino right now. I am controlling a motor by writing a PWM to a bridge that is connected to a motor. I am trying to create a simple feedback using ISR. The idea is that I have the interrupt pulled down to the ground with a 1K resistor. Afterward, I have a wire that I am connecting to the 5V (coming from the Arduino board). When I connect the wire, I am hoping my analogWrite to the bridge will change to 0 and that when I unplug the wire from 5V, the analogWrite will continue from before.
I attached my sketch for viewing. The problem is that I initially was attaching pin 2 to the 15V power supply rail for a high signal. So now when I use pin 3 for my interrupt it works some of the time but for pin 2, it doesn't work at all. I am powering my Arduino through my laptop's USB, I was wondering if there was a way to test if pin2 is permanently damaged it's simply my bad firmware?
Test_Motor_Sketch_Jan16.ino (974 Bytes)