'> not declared'

I have a problem with gt not being declared in mode, does anyone know how I might be able to fix this?

Error as screen shot and not posting the code... Not very helpful.

But it means what it says, in that point gt (terrible name btw) does not exist :slight_smile:

Sorry not been doing this long. So i am trying to say if sensor value is greater than 0 but less than 500 do . . .

there fore what do i need to write. My code is as follows currently;

int sensorPin = 0;
int ledPin1 = 9;
int ledPin2 = 10;
int ledPin3 = 11;
int sensorValue = 0;

void setup()
{

Serial.begin(9600);
pinMode(ledPin1, OUTPUT);
pinMode(ledPin2, OUTPUT);
pinMode(ledPin3, OUTPUT);
}

void loop()
{
sensorValue = analogRead(sensorPin);
Serial.print("Forceo value = ");
Serial.println(sensorValue);

if(sensorValue > 0 &&amp: sensorValue <= 500);
{
digitalWrite(ledPin3, HIGH);
}
else digitalWrite*ledPin3, LOW);

}

<

 if(sensorValue &gt; 0 &amp;&amp: sensorValue &lt;= 500);

is not C. Its a mix of (incorrect) C and (incorrect) HTML!

 if(sensorValue > 0 && sensorValue <= 500)

is presumably whats needed. Note the semicolon at the end was completely wrong

  else digitalWrite*ledPin3, LOW);

Also needs fixing, but that's a bit more obvious!

Incidentally the screen shot and the code are different - a semicolon in one is a colon in the other.

perkinsa:
Sorry not been doing this long.

Not a problem, that's why we have a handy sticky at the top of each board called How to use the forum. But he, who reads stuff!

The code is obviously copied from some website without any thought and without minding the C syntax.

We are lucky it wasn't an Excel spreadsheet I suppose!

Advice: copy program source as raw text always, never post screenshots of text, post the raw text, then its
searchable, accessible, small-screen-friendly etc etc.

MarkT:
We are lucky it wasn't an Excel spreadsheet I suppose!

LMAO! THAT would have been REALLY funny! :wink: