Pages: [1]   Go Down
Author Topic: Missing line in eeprom_clear?  (Read 387 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

I am fairly new to arduino programming .
After my first small projects I checked some of the example files.
The sample code "eeprom_clear" (see http://arduino.cc/en/Tutorial/EEPROMClear or Examples->EEPROM->eeprom_clear in the IDE) does not work as intended since the (led) port 13 is not declared to be in output mode.
So, the missing line is
pinMode(13, OUTPUT);

Is this a mistake on my part or a case to be reported to the dev team?
Best regards
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 549
Posts: 46107
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Is this a mistake on my part
No.

Quote
or a case to be reported to the dev team?
Yes. In the Website and Forum section.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

done.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 509
Posts: 31462
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

In the past this pin was initialised to be an output by the boot loader. It now no longer is. It looks like they have not updated this to take the change into account. Failing to initialise any pin you use is however very bad practice.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

See here: http://arduino.cc/forum/index.php/topic,117872.0.html
Logged

Pages: [1]   Go Up
Jump to: