Pages: [1]   Go Down
Author Topic: [SOLVED] Problem with Arduino 1.0 IDE (Linux) and Blinking  (Read 1587 times)
0 Members and 1 Guest are viewing this topic.
Forio
Offline Offline
Newbie
*
Karma: 0
Posts: 19
Vi Veri Veniversum Vivus Vici
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm using an Arduino UNO board and I've a problem with the Arduino 1.0 IDW (I'm using Slackware Linux).
In particular the Blinking of a Led doesn't work.
The code that I used is here:

Code:
// Example 01 : Blikning LED


#define LED 13 // LED connected to
              // digital pin 13
              
              
void setup() {  
  pinMode(LED,OUTPUT); //sets the digital pin
                       //as output                
}

void loop(){
  digitalWrite(LED,HIGH); //turns LED on
  delay(3000);            // wait 3 seconds
  digitalWrite(LED,LOW);  //turns the LED off
  delay(3000);
}

It worked on Arduino 0021.
Me(Slackware64) and another Arduino Linux user (Slackware) have the same problem.
We're using the Slacky.eu packages (I'm the mantainer of these packages).
I tried to use Slackbuilds.org packages but the problem remains the same.
With the 0022 version the problem can be solved with an:

Code:
#include "ArduinoTestSuite.h

but in the current version I didn't find this library.

Thanks of all!
« Last Edit: January 06, 2012, 08:41:45 am by Vito » Logged

Stat rosa pristina nomine,nomina nuda tenemus.
[Umberto Eco - Il nome della Rosa]

"The old Europe"
Offline Offline
Edison Member
*
Karma: 1
Posts: 2005
Bootloaders suck!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

So you're saying "It doesn't work" - whatever that actually means. That is not helpful.

The code you've posted compiles fine.
Logged

• Upload doesn't work? Do a loop-back test.
• There's absolutely NO excuse for not having an ISP!
• Your AVR needs a brain surgery? Use the online FUSE calculator.
My projects: RGB LED matrix, RGB LED ring, various ATtiny gadgets...
• Microsoft is not the answer. It is the question, and the answer is NO!

Forio
Offline Offline
Newbie
*
Karma: 0
Posts: 19
Vi Veri Veniversum Vivus Vici
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry, I forgot to explain what I mean with "doesn't work".
The code (as you can see) is correct,but the led doesn't blink!
It remains always HIGH.
Logged

Stat rosa pristina nomine,nomina nuda tenemus.
[Umberto Eco - Il nome della Rosa]

"The old Europe"
Offline Offline
Edison Member
*
Karma: 1
Posts: 2005
Bootloaders suck!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

So it hangs inside delay(3000);

The only reason for that would be that 'millis()' doesn't change, and that means that timer0 doesn't run.

Could you test:

Code:
void setup() {
  Serial.begin(9600);
}

void loop() {
  Serial.println(millis());
}

Also I should point out that some versions of avr-gcc seem unusable. I think 4.3.3 and 4.4.3 are good. Personally I have a self-compiled version using the build-script for linux, which can be found on avrfreaks.net
« Last Edit: January 04, 2012, 10:47:45 am by madworm » Logged

• Upload doesn't work? Do a loop-back test.
• There's absolutely NO excuse for not having an ISP!
• Your AVR needs a brain surgery? Use the online FUSE calculator.
My projects: RGB LED matrix, RGB LED ring, various ATtiny gadgets...
• Microsoft is not the answer. It is the question, and the answer is NO!

Forio
Offline Offline
Newbie
*
Karma: 0
Posts: 19
Vi Veri Veniversum Vivus Vici
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The code works fine!
I can read the output in the serial monitor.
So,Could it be my version of GCC? (4.5.3)
I will try to downgrade it.
« Last Edit: January 04, 2012, 11:51:14 am by Vito » Logged

Stat rosa pristina nomine,nomina nuda tenemus.
[Umberto Eco - Il nome della Rosa]

Forio
Offline Offline
Newbie
*
Karma: 0
Posts: 19
Vi Veri Veniversum Vivus Vici
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

same problem with 4.4.3 .
Now I try with 4.3.3 .
Logged

Stat rosa pristina nomine,nomina nuda tenemus.
[Umberto Eco - Il nome della Rosa]

Offline Offline
God Member
*****
Karma: 32
Posts: 507
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This sounds like the binutils bug, if so you need to downgrade binutils (which might imply downgrading gcc too). Search the forum, lots of other people have had this problem and there are other ways round it (I think simply including the serial library cures it).
Logged


Forio
Offline Offline
Newbie
*
Karma: 0
Posts: 19
Vi Veri Veniversum Vivus Vici
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Same problem with 4.3.3 .
I try to downgrade also binutils.
Logged

Stat rosa pristina nomine,nomina nuda tenemus.
[Umberto Eco - Il nome della Rosa]

Forio
Offline Offline
Newbie
*
Karma: 0
Posts: 19
Vi Veri Veniversum Vivus Vici
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

With gcc 4.3.3 and binutils 2.20.1 the blinking works fine!
Logged

Stat rosa pristina nomine,nomina nuda tenemus.
[Umberto Eco - Il nome della Rosa]

Pages: [1]   Go Up
Jump to: