Pages: [1]   Go Down
Author Topic: My Arduino Due Serial Monitor doesn't worke.  (Read 520 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

USA, FL
Offline Offline
God Member
*****
Karma: 14
Posts: 688
A life? Where can I download one of those?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Where is the code that didn't work?

Please post it between code tags...
Logged

//LiNK

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8471
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Pages: [1]   Go Up
Jump to: