not getting the expected reponse why.

Hi, I am a newbie to arduino. I have written a simple program from the "Making Things Talk" book .

The expected result is: "It adds one to whatever serial value it receives, and sends the result back out. It also blinks an LED on pin regularly, on pin13, to let you know that it's still working"

Here is the program:

/* Simple Serial Language: Arduino Listens for a incoming serial byte, adds one to the byte and sents the result back out serially. Also blinks an LED on pin13 every half second. */

int LEDPin = 13; int inByte = 0; long blinkTimer = 0;

int blinkInterval = 1000;

void setup() { pinMode(LEDPin, OUTPUT); Serial.begin(9600);


void loop() { // if there are any incoming serial bytes available to read: if (Serial.available() >0){ //then read the first available byte: inByte =; // and add one to it, then send the result out: Serial.print(inByte+1, BYTE); } // Meanwhile, keep blinking the LED. // after a half a second, turn the LED on: if (millis() - blinkTimer >= blinkInterval /2) { digitalWrite(LEDPin, HIGH); // turn the LED on pin 13 on } // after half a second turn the LED off and reset the timer: if (millis() - blinkTimer >= blinkInterval) { digitalWrite(LEDPin, LOW); // turn the LED off blinkTimer = millis(); // reset the timer } }

Once I have uploaded this program here is what I am expected to see happen:

"To send bytes from the computer to the microcontroler, first compile and upload this program. Then click the Serial Monitor icon (The right most icon on the toolbar) Type any letter in the text entry box and press enter or Send. The module will respond with the next letter in the sequence. For every character you type, the modual adds one to that characters ASCII value and sends it back the result. "

The program seems to compile OK and I click the serial IO button as directed. I type any letter in the text entry box and hit send. But I don't get any response as the instructions indicate I should.

Can someone see what I might be doing wrong ? Do you need any additional information ?

Any help in solving this is welcome. Thank you. J.

The program seems to compile OK

Works perfectly.

Did you upload the program to the Arduino? Is the LED blinking? Did you set the serial monitor speed to 9600?

Thanks for responding. I am embarrassed to say I had not uploaded it to the Arduino board. Now it works.