Everything for Electronics
Posted in: Nuts and Volts ( )

Arduino 1.0 Available Now!

The Arduino development environment (IDE) has undergone a number of adjustments:

  • The file extension for sketches has changed from .pde to .ino, to avoid conflicts with the Processing software (“ino” are the last three letters in “Arduino”).
  • There are a new set of toolbar icons, including a checkmark icon to verify (compile) a sketch and an arrow for upload. The serial monitor icon has moved to the right of the toolbar. Also, shift-clicking the upload icon now uploads using a programmer (selected in the Tools menu). You can still enable verbose output in the preferences dialog. (Icons were designed by Nicholas Zambetti.)
  • There’s a new color scheme and about image for the IDE (by ToDo.to.it).
  • The name of the currently selected board and serial port are now shown at the bottom of the editor. (Code from Wiring.)
  • A progress bar is displayed during compilation and upload. (Code from Wiring.)

The changes of perhaps larger practical impact, though, are those to the Arduino language. Here are some of the bigger changes:

  • Serial transmission is now asynchronous – that is, calls to Serial.print(), etc. add data to an outgoing buffer which is transmitted in the background. Also, the Serial.flush() command has been repurposed to wait for outgoing data to be transmitted, rather than dropping received incoming data.
  • The behavior of Serial.print() on a byte has been changed to align it with the other numeric data types. In particular, it will now print the digits of its argument as separate ASCII digits (e.g. ’1′, ’2′, ’3′) rather than a single byte. The BYTE keyword has been removed. To send a single byte of data, use Serial.write() (which is present in Arduino 0022 as well).
  • The Serial class (as well as other classes inheriting from Stream, like EthernetClient, SoftwareSerial, Wire and more) now contains functions for parsing incoming data, based on the TextFinder library by Michael Margolis. They include find() and findUntil() to search for data, parseInt() and parseFloat() for converting incoming characters into numeric values, and readBytes() and readBytesUntil() for reading multiple bytes into a buffer. They use a timeout that can be set with the new setTimeout().
  • The SoftwareSerial class has been reimplemented, using the code originally written for the NewSoftSerial library by Mikal Hart. This allows for multiple simultaneous instances, although only one can receive at a time.
  • Support has been added for printing strings stored in flash (program memory) rather than RAM. Wrap double-quoted strings in F() to indicate that they should be stored in flash, e.g. F(“hello world”).
  • The String class has been reimplemented as well, by Paul Stoffregen. This new version is more memory-efficient and robust. Some functions which previously returned new string instances (e.g. trim() and toUpperCase()) have been changed to instead modify strings in place.
  • Support for DHCP and DNS has been added to the Ethernet library, thanks to integration by Adrian McEwen. Most classes in the Ethernet library have been renamed to add a “Ethernet” prefix and avoid conflicts with other networking libraries. In particular, “Client” is now “EthernetClient”, “Server” is “EthernetServer”, and “UDP” is “EthernetUDP”. A new IPAddress class makes it easier to manipulate those values.
  • The UDP API has been changed to be more similar to other libraries. Outgoing packets are now constructed using calls to the standard write(), print(), and println() functions – bracketed by beginPacket() and endPacket(). The parsePacket() function checks for and parses an incoming packet, which can then be read using available(), read(), and peek(). The remoteIP() and remotePort() functions provide information about the packet’s origin. (Again, thanks to Adrian McEwen for the implementation.)
  • The Wire library has also been modified to use the standard read() and write() functions instead of send() and receive(). You can also use print() and println() for outgoing data.
  • The SD library now supports multiple simultaneous open files. It also provides the isDirectory(), openNextFile(), and rewindDirectory() functions for iterating through all the files in a directory. (Thanks to Limor Fried.)
  • There are some other small additions that will be documented in the reference updates for Arduino 1.0.

[Source] Arduino.cc