Pages: [1] 2   Go Down
Author Topic: Arduino 0011 released.  (Read 2081 times)
0 Members and 1 Guest are viewing this topic.
Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 9
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Arduino 0011 is now available: Windows, Mac OS X, Linux.  

Changes include:

* Improved reliability for uploading to Arduino BT.
* Better support for bootloader burning with a parallel programmer.
* Fixed Find in Reference.
* Added map() function for mapping values from one range to another.
* Added analogReference() function.
* Added interrupts() and noInterrupts() functions.
* Added degrees() and radians() functions.
* Added timeout parameter (in microseconds) to pulseIn(); default is 1 second.
* Support for uploading sketch using a programmer.
* Improved detection of functions that need prototyping.
* Placing function prototypes after #include's and #define's.
* No longer moving #include statements to the top of the sketch.
* Can now drag .pde files onto the Arduino dock icon on Mac OS X.
  Thanks to Peter Sgouros.
* New script for downloading the reference from Tom Pollard.  Thanks Tom!
* Miscellaneous Mac OS X and other patches from Wim Lewis.  Thanks Wim!
* Updated Mac OS X FTDI drivers.


Updates to the reference and other documentation will follow in the next few days.
Logged

Brazil
Offline Offline
Sr. Member
****
Karma: 0
Posts: 443
..., to learn, to know, to make, to share, to l...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm downloading it right now, and if I have some kind of problem, I'll tell you.

I will test it with XP SP2 and Win98, and serial arduinos.
Logged

PCB Designer

Brazil
Offline Offline
Sr. Member
****
Karma: 0
Posts: 443
..., to learn, to know, to make, to share, to l...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Mellis,

The bootloader in this version is working fine with old serial board and severino (no more 10 min. delay or older versions needed). Thanks! smiley-wink
The upload sketches too.

I erased the chip with -e command, and then uploaded a sketch without the bootloader using these (DOS) commands:
Code:
avrdude -Cc:\arduino-0011-win\arduino-0011\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -pm8 -cdapa -b115200 -e

avrdude -Cc:\arduino-0011-win\arduino-0011\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -pm8 -cdapa -b115200 -D -Uflash:w:c:\arduino-0011-win\arduino-0011\examples\Digital\Blink\applet\Blink.hex:i

And I did a test with IDE 0010, with the same commands, and it worked too! The sketch starts without the 10 sec. delay in both cases. Is this strange with 0010?
Code:
avrdude -Cc:\arduino-0010-win\arduino-0010\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -pm8 -cdapa -b115200 -e

avrdude -Cc:\arduino-0010-win\arduino-0010\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -pm8 -cdapa -b115200 -D -Uflash:w:c:\arduino-0010-win\arduino-0010\examples\Digital\Blink\applet\Blink.hex:i


And how can we do this using IDE? I've tried using the old process (http://www.arduino.cc/en/Hacking/Programmer) but the 0011 IDE seems to bypass the preferences.txt file. I saw you said "it will return in a different form", so how can we do the trick?
Logged

PCB Designer

Brazil
Offline Offline
Sr. Member
****
Karma: 0
Posts: 443
..., to learn, to know, to make, to share, to l...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, you don't have to answer the last question. I saw your recent changes in http://www.arduino.cc/en/Hacking/Programmer

and I tested it, changing upload.using from bootloader to parallel and sketch was uploaded without problems with IDE! This is very useful! Mainly for Atmega8, with low mem space. And no bootloader  to sketch delay!
« Last Edit: March 29, 2008, 02:24:58 pm by adilson » Logged

PCB Designer

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 9
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Awesome.  Thanks for trying it out!
Logged

0
Offline Offline
God Member
*****
Karma: 2
Posts: 854
Arduino rocks!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is this just a new IDE or a new firmware that would have to be flashed?
Logged

London
Offline Offline
Faraday Member
**
Karma: 8
Posts: 6240
Have fun!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The changes to the auto prototyping logic seem to have fixed all the bugs in this area that I had reported. Many thanks for fixing this.

One strange thing I have noticed is that sketches that include stdio.h now compile with a series of errors such as this:
  c:/got/arduino/arduino-0011/hardware/tools/avr/bin/../avr/include/stdio.h:263: error: expected unqualified-id before 'int'

You can reproduce the problem by compiling the following sketch:

Code:
#include <stdio.h>
void setup() {
}
void loop(){
}

BTW, would you prefer bug reports here or in Software/bugs & suggestions
Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 9
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Either place is fine.

This bug is caused by the new function-like casts that I added to Arduino 0011 for consistency with Processing and Wiring (and to avoid having an extra kind of syntax).  That is, you can say:

byte b = 5;
int x = int(b);

Unfortunately, this interferes with places where int is used as the return type of a function pointer, as in stdio.h:

      int      (*put)(char, struct __file *);      /* function to write one char to device */

To work-around the problem, you can put:

#undef int()

before the:

#include <stdio.h>

Logged

London
Offline Offline
Faraday Member
**
Karma: 8
Posts: 6240
Have fun!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the work around, that does fix the stdio.h problem.

BTW, are you aware that stdio.h is included in wiring_private.h so anything that includes that header will generate the error.    Not sure why its included, but removing stdio.h from  wiring_private.h may be something to consider for the next release.


 byte b = 5;
 int x = int(b);
in the  example you posted , the standard C cast would work, I am curious to see an example where the cast would not work, could you point me to a processing fragment that demonstrates the problem.
Logged

Seoul
Offline Offline
Jr. Member
**
Karma: 0
Posts: 58
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Wow, I really love it. Great works!
Success rate for my ArduinoBT uploading is greatly improved even with my slow-reaction button-pressing.

Thanks a lot
Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 9
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

A cast would work just as well, but it's an extra syntax for people to learn.  By including a function-like macro that does the same thing, people can use the syntax they already know.
Logged

London
Offline Offline
Faraday Member
**
Karma: 8
Posts: 6240
Have fun!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am unclear on the impact of the work-around. If the macro was needed in a sketch then would there be a compile problem if the work-around was used in that sketch?

I guess I am having trouble seeing where the macro would be needed. Perhaps an example illustrating the issue the new macro addresses would help to make things clearer.
Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 9
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The macro is need any where you would have previously used as a cast.  It allows people to avoid learning the cast syntax.
Logged

London
Offline Offline
Faraday Member
**
Karma: 8
Posts: 6240
Have fun!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Code:
#define int(x)     ((int)(x))
#define char(x)    ((char)(x))
#define long(x)    ((long)(x))
#define byte(x)    ((uint8_t)(x))
#define float(x)   ((float)(x))
#define boolean(x) ((uint8_t)((x)==0?0:1))


I had a look at the new wiring.h and it appears that there will also be a problem with function pointers that return: char, long, byte, float and boolean.

This may well be a reasonable trade-off but I am struggling to think of an example where these macros would be helpful. Could you humor me and point me towards an example that requires one of these macros.
Logged

0
Offline Offline
Jr. Member
**
Karma: 1
Posts: 64
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The macro is need any where you would have previously used as a cast.  It allows people to avoid learning the cast syntax.
I think I can see where you're coming from, trying to make things easier for newbies, but I think the casting syntax isn't that complicated that it should need a macro.

Are there any intro-level tutorials for writing C/C++ on the Arduino on the site anywhere? Perhaps if there were some basic C tutorials available, macros like this wouldn't be needed, as the tutorials should cover basics like casting.
Logged

Pages: [1] 2   Go Up
Jump to: