Problem: New 2nd Ed "Getting Started With Arduino" & arduino-1.0-rc1

I just purchased the new Second Edition of "Getting Started With Arduino," by Massimo Banzi, and also downloaded arduino-1.0-rc1.

When trying to run the very first example in the new book, I get an error message.

sketch_sep19a:1: error: conflicting declaration 'const int LED'

arduino-1.0-rc1\hardware\arduino\variants\standard/pins_arduino.h:47: error: 'LED' has a previous declaration as 'const uint8_t LED'

Yep, LED is invalid, for any example in the Second Edition, since it is already internally defined, in the new IDE. This isn't a problem in IDE 0022, or previous IDE.

That makes many of the examples in the brand new, published in September 2011 book, that I just paid for, less useful than they should be, and seriously undermines the value of the new book, since so many of the examples will no longer work as published.

Yes, I can go in and change LED to something else, but it sure seems pretty stupid to have to do it in the first place. Why publish a brand-new book that already doesn't work as written? Why publish a new IDE that makes an arbitrary change that affects previously published books and tutorials? The new edition of the book shows Arduino 1.0-beta1 as the IDE, but by rc1 there have already been changes that conflict with the book.

arduino-1.0-rc1\hardware\arduino\variants\standard/pins_arduino.h:47: error: 'LED' has a previous declaration as 'const uint8_t LED'

It's used nowhere in that file, so it appears to have been added as a "convenience" for you.

I don't think I need that kind of help.

This is the kind of problem introduced by the new Arduino boards, the Arduino teams wants "LED" to work no matter what board is being used. This is OK, but the name really should be more descriptive, maybe PIN_LED.

Hello

There is a mistake in Arduino 1.0 RC1 and it will be fixed in the next RC due soon.

Books have longer production processes than software and when the RC1 came out it introduced this issue.

It will be renamed to LED_L soon. In the meantime you can just rename LED to something else like MYLED and it will all work.

I apologise about this issue.

massimo