So what exactly I am trying to do is control a motor and be able to turn it both ways without any extra parts.
So if the hmp was on (the plus pole) and the hmm (the minus pole) acted like ground the motor should start turning right.
But if the hmp acted in this case as ground and the hmm like the plus pole it should start turning the other way.
I know that it's probably not going to work. I'm just experimenting.
int Hmp=12; // the plus pole
int Hmm=11; // the minus pole
while (HR=0 || Sr > Sl+300) {
pinMode(Hmp, OUTPUT);
digitalWrite(Hmp, HIGH);
pinMode(Hmm, INPUT);
}
while (HR=1 || Sl > Sr+300) {
pinMode(Hmp, INPUT);
pinMode(Hmm, OUTPUT);
digitalWrite(Hmm, HIGH);
}
