the last time i said that the problem is that i said that i have putten the void setup in the void loop…
but i was wrong
what the hell is the ERROR :0
const int CP1 = 2;
const int CP2 = 3;
const int enablePin = 9;
const int DSP = 4;
const int OFSSSP = 5;
const int potPin = A0;
int OFSS = 0;
int POFSS = 0;
int DSS = 0;
int PDSS = 0;
int MOE = 0;
int MOS = 0;
int MOD = 0;
void setup() {
pinMode(DSP, INPUT);
pinMode(OFSSSP, INPUT);
pinMode(CP1, OUTPUT);
pinMode(CP2, OUTPUT);
pinMode(enablePin, OUTPUT);
digitalWrite(enablePin, LOW);
}
void loop () {
OFSS =
digitalRead(OFSSSP);
delay(1);
DSS =
digitalRead(DSP);
MOS = analogRead(potPin)/4;
if(OFSS != POFSS){
if(OFSS == HIGH){
MOE = !MOE;
}
}
if (DSS != PDSS) {
if (DSS == HIGH) {
MOD = !MOD;
}
}
if (MOD == 1) {
digitalRead(CP1, HIGH);
digitalRead(CP2, LOW);
}
else {
digitalRead(CP1, LOW);
digitalRead(CP2, HIGH);
}
if (motorEnabled == 1) {
analogWrite(enablePin, MOS);
}
else {
analogWrite(enablePin, 0);
}
PDSS = DSS;
POFSS = OFSS;
}
please does anyone know what is wrong?????????????????????? :0
FOR MORE INFO GO TO ATTACHMENT
fast_motor.ino (436 Bytes)