So, over the weekend I had a little play with the nice, new and shiny Arduino 1.0 IDE. Along with some nice new colour schemes, and a good deal of added functionality within the context menus, it feels a lot tidier than previous incarnations!

However, the fun starts when trying to work on programs created in previous IDE versions. I ran into a few cryptic errors, and to help fellow Arduino-ers avoid the same head-beating torment, here’s a few tips to get around the errors that have popped up so far.

  1. 1 – “Stray “/345″ in program” or similar…

This appears to be caused by the encoding method used in certain cpp and header files. Due to another “bug”, I had been editing certain .cpp and .h files. Using the trusty notepad application, I had hastily saved the changed files in UTF-8 encoding. This causes the above mentioned glitch. Re-saving the file mentioned in the console error line as ANSI fixes everything, and the error messages will dissapear.

  1. 2 – Missing “WProgram.h” files

My understanding (for lack of any one explaining it to me) is that WProgram.h is the definitions file that handles rather a lot of the actual setup and pin-mapping of the arduino-specific functions of the environment, like certain pin namings, functions, etc. Long story short, “WProgram.h” is now called “Arduino.h” in 1.0, and editing “WProgram.h” for “Arudino.h” in the offending .cpp/.h file in notepad will fix the errors.

  • 3 – Wire library errors

I use I2C wherever I can, not only for hardware simplicity, but for code simplicity too (I’m still wrapping my head around the finer points of SPI!). The Arduino software uses a library called “Wire” to provide a nice easy interface to the I2C protocol. The last major thing I’ve found to report on so far in the Arduino 1.0 is that certain functions of the “Wire” library have changed names. Wire.send() and Wire.recieve() are now Wire.write() and Wire.read() respectively!

I’d not really appreciated the release notes for the IDE in such a fashion until now! It wasn’t until I’d spent a half hour googling some cryptic console errors and finding answers the hard way that the idea dawned on me to check the actual notes that came with the release. D’oh!