The serial monitor is not working!!!

I have a RED BOARD runing Arduino 1.0.6 with windowsXP (32-bit). The code is uploaded correctly but the serial monitor is not working. I write “S” and the code is not working. What to do?

Post your code.

Tell us what you actually get. It is possible that you do not have the same baud rate on your terminal as you have setup on your Arduino.

Weedpharma

liudr:
Post your code.

int secValveRelayPin = 10;
int ValveRelayPin = 11;
char recievedChar;
int iter;

void setup () { Serial.begin(9600);
pinMode(ValveRelayPin, OUTPUT);
digitalWrite(ValveRelayPin, LOW); //position 2
pinMode(secValveRelayPin, OUTPUT);
digitalWrite(secValveRelayPin, HIGH); //position 1
}

void loop () {
if (Serial.available() > 0) {
recievedChar = Serial.read();
if (recievedChar == 'S') {
while(1) {

digitalWrite(ValveRelayPin, LOW); //position 2, DI cleaning
digitalWrite(secValveRelayPin, HIGH); //position 1, DI
Serial.println("Old Valve at position 2, New valve at position 1");

delay(14400000); //wait 240 minutes

digitalWrite(secValveRelayPin, LOW);//position 2, LWCC cleaning sln
Serial.println("New Valve at position 2");

delay(600000); //wait 10 minutes

digitalWrite(secValveRelayPin, HIGH);//position 1, DI cleaning
Serial.println("New Valve at position 1");

delay(900000); //wait 15 min

digitalWrite(ValveRelayPin, HIGH);//position 1, sample
Serial.println("Old Valve at position 1");

delay(180000); //wait 3 min

digitalWrite(ValveRelayPin, LOW);
Serial.println("Valve at position 2");

iter++;
delay (2000); //wait 2 seconds
Serial.println("Sample # ");
Serial.print(iter);
Serial.println(" complete!");

}
}
}
}

It is working here.
No problem with the serial monitor here, S is sent and received.
Message from sketch 'Old Valve at position 2, New valve at position 1'.

Whandall:
It is working here.
No problem with the serial monitor here, S is sent and received.
Message from sketch ‘Old Valve at position 2, New valve at position 1’.

I know tha the code is written correcty, but I do not know what is going wrong!!!Any suggestions?The valves are not working!I have checked also the cables and I did reset from the reset button in the board!

kalliviolaki:
I know tha the code is written correcty,

Your code shows no syntactic errors, that is (obviously) different from being correct.

Anway, there is no problem with the serial monitor here (used in a standard way),
so it should work at your place also (on the right port, with the right baudrate, ...).

Probably stuck in one of the long delays.

During a delay, nothing happens so it will not read the serial.

It is not good practice to use delay() for any but short periods. Use millis().

Weedpharma

Tell us:
What your code's expected and actual behaviors are.

Whandall:
Your code shows no syntactic errors, that is (obviously) different from being correct.

Anway, there is no problem with the serial monitor here (used in a standard way),
so it should work at your place also (on the right port, with the right baudrate, ...).

What do you mean the with the "right baudrate"???

kalliviolaki:
What do you mean the with the "right baudrate"???

The same as you are sending with?

liudr:
Tell us:
What your code's expected and actual behaviors are.

The code is expected to connect two different fluid valve processor (Alltech, Inc.), which are working with different way seperately. I hope to help you with my response!

Whandall:
The same you are sending with?

How can I check that? Sorry for “silly” question but I am not experienced “arduino user”.

kalliviolaki:

void setup () { Serial.begin(9600);

What is your terminal baud rate set to?

Add the lines below to see if you have communications with the Arduino.

.
.
.

receivedChar = Serial.read();

Serial.print ("Received Char ");
Serial.print (receivedChar);
.
.
.

Weedpharma

Thank you so much! I will do it on Monday because I am out of office right now ! I will let you know for the results!!

Hi!
The code was not uploaded .
I received the message :

This report would have more information with
“Show verbose output during compilation”
enabled in File > Preferences.
Arduino: 1.0.6 (Windows XP), Board: “Arduino Uno”
TEST:2: error: expected unqualified-id before ‘.’ token
TEST:8: error: expected constructor, destructor, or type conversion before ‘.’ token
TEST:9: error: expected constructor, destructor, or type conversion before ‘.’ token
TEST:10: error: expected unqualified-id before ‘.’ token

Without posting your code (in code tags </>) nobody will be able to help you.

I upload the code you suggested me!

.
.
.

receivedChar = Serial.read();

Serial.print "Received Char";
Serial.print (receivedChar);
.
.
.

Without posting all of your code (in code tags </>) nobody will be able to help you.