again " at this point in file "

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)

What is wrong is that you need to learn How to post code properly

Then get rid of the annoying scrolling text.

Then maybe I'll look at your code.

Pete

Yes, I know what is wrong. You're reading comprehension skills are completely lacking.

You've been asked not to use the marquee crap, yet here you are again, with the same annoying type crap.

The error message is not "at this point in the file". It is:

sketch_may03a:47: error: at this point in file
C:\Users\pjs9486\Documents\arduino-1.0.5\hardware\arduino\cores\arduino/Arduino.h:100: error: too many arguments to function 'int digitalRead(uint8_t)'

Which tells you EXACTLY what is wrong.

You probably meant to use digitalWrite() instead of digitalRead().

oh your right :P,thanks :slight_smile: