I've been having a problem with the arduino IDE version 0022 for the past few months that has really been bugging me.
It happens when I make modifications to already saved code. Randomly sometimes the code will compile as if I had not made any changes! Even if I save the new changes. For example here is the example code for master_writer "part of the wire library".
#include <Wire.h>
void setup()
{
Wire.begin(); // join i2c bus (address optional for master)
}
byte x = 0;
void loop()
{
Wire.beginTransmission(4); // transmit to device #4
Wire.send("x is "); // sends five bytes
Wire.send(x); // sends one byte
Wire.endTransmission(); // stop transmitting
x++;
delay(500);
}
This Runs Fine but if I make the modifications below:
#include <Wire.h>
void setup()
{
Wire.begin(); // join i2c bus (address optional for master)
}
byte x = 0;
void loop()
{
Wire.beginTransmission(4);
Wire.send("Robotman"); <------------------------------------
Wire.send("Robotman"); <------------------------------------
Wire.endTransmission(); // stop transmitting
x++;
delay(500);
}
Nothing happens! The compiler acts as if only half changes where made and what gets sent is "Robotman 1" not "Robotman Robotman" . Also if I restart the IDE and use copy paste with the code the same problem occurs. Its like "Wire.send(x);" is hidden inside the text. The only way to fix it is to restart the IDE and type the whole program up form scratch. This is a really big problem when it occurs in larger programs because I have to retype it all for it to work again.
If anybody can shed some light on how to fix this it would be greatly appreciated.