Go Down

Topic: My Arduino Due Serial Monitor doesn't worke. (Read 588 times) previous topic - next topic

RedjanFier

I cant use the Serial Monitor. Even with  a simple code like this:

char val;
void setup()
{

pinMode(pn,OUTPUT);
Serial.Write(9600);
}
void loop;
{
if(val=='a')
{
do something;
}

if(val=='s')
{
do something else;
}


I open the Serial window,i put the values,pres Enter...And nothing happens..

can somebody help me?

codlink

Where is the code that didn't work?

Please post it between code tags...
//LiNK

Graynomad

Quote
Serial.Write(9600);

What is this? You nave not setup the serial port

You need

Serial.begin(9600);

in setup() followed by (for example)

Serial.println("Hello world");


______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

Go Up
 

Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it's been approved by a moderator.
Name:
Email:

shortcuts: alt+s submit/post or alt+p preview