Having troble with one of the projects out of the projects book

When I try to verify, it comes up with this error message:exit status 1 expected unqualified-id before numeric constant

What dose this mean and how to I fix it?

What project coming from what projects book? Please post your code in code </> tags so we can help you. :slight_smile:

The project is number 04: Color mixing lamp. When the error code comes up, it highlights line 12. Here is the code:

const int greenLEDin = 9; const int redLEDin = 10; const int blueLEDin = 11;

const int redSensorPin = A1; const int greenSensorPin = A2; const int blueSensorPin = A0; int redValue = 0; int greenValue = 0; int blueValue = 0;

int redValue = 0; int greenValue = 0; int blueValue = 0;

void setup() { Serial.begin(9600); pinMode(greenLED, OUTPUT); pinMode(redLED, OUTPUT) ; pinMode(blueLED, OUTPUT); void loop() { redSensorValue = analogRead(redSensorPin); delay(5); greenSensorValue = analogRead(greenSensorPin); delay(5); blueSensorValue = analogRead(blueSensorPin); Serial.print("Raw Sensor Values /t red: "); Serial.print(redSensorValue); Serial.print("/t green: "); Serial.print(greenSensorValue); Serial.print("/t blue: "); Serial.print(blueSensorValue); redValue = redSensorValue/4; greenValue = greensSensorValue/4; blueValue = blueSensorValue/4;

Serial.print("Mapped Sensor Values /t red: "); Serial.print(redValue) Serial.print("/t green: "); Serial.print(greenValue); Serial.print("/t blue:") Serial.print(blueValue); analogWrite(redLEDin, redValue); analogWrite(greenLEDin, greenValue); analogWrite(blueLEDin, blueValue); }

Please do us all a favour and post the code without useless line number but with code tags as requested

A silly question, but you have not by any chance typed in the line numbers, have you ?

What are code tags? I'm not sure as I am very new to coding.

Yes, I did put in the numbers. I found it easier to follow that way.

When you are writing a reply on this forum, there is a button that looks like this: </> , next to the bold, italics, etc… When you put the code inside of the tags,

it looks like this!

Here are a few issues I spotted so far-

int redValue = 0;
int greenValue = 0;
int blueValue = 0;

int redValue = 0;
int greenValue = 0;
int blueValue = 0;
const int greenLEDin = 9;
const int redLEDin = 10;
const int blueLEDin = 11;
pinMode(greenLED, OUTPUT);
  pinMode(redLED, OUTPUT) ;
  pinMode(blueLED, OUTPUT);

There’s a few other issues, but can you spot what’s wrong with these?

Oh, for reference to others, this appears to be Project 4 from the Arduino Starter Kit.

Guineapig04:
Yes, I did put in the numbers. I found it easier to follow that way.

Take them out. The program will not compile with them in.

The IDE has line numbers of its own if you find them helpful. Turn them on in File/Preferences.