Pages: [1]   Go Down
Author Topic: Serial problem  (Read 495 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 15
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
i am a newbie. I write this program but don't work. Why?

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

void loop() {
  digitalWrite(9,HIGH);
  Serial.println("ON");
  delay(500);
  
  digitalWrite(9,LOW);
  Serial.println("OFF");
  delay(500);
}

The led blink but in the console ( is the console down to the ide? ) don't show anything...

In the board i have just a led and a 330 resistor.


if i try that code the led blink:

void setup() {
  pinMode(9, OUTPUT);
}

void loop() {
  digitalWrite(9,HIGH);
  delay(500);
  digitalWrite(9,LOW);
  delay(500);
}

so there isn't a led problem.
Logged

UK
Offline Offline
Faraday Member
**
Karma: 17
Posts: 2884
Gorm deficient
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Have you opened the serial monitor on the IDE?
Logged

Per Arduino ad Astra

Pages: [1]   Go Up
Jump to: