Hello,
the script below used to work with Arduino 0016.Now with hardware the Arduino UNO and Arduino 1.0 I get the error:
/Applications/Arduino.app/Contents/Resources/Java/libraries/E24C1024/E24C1024.h:47:24: error: WConstants.h: No such file or directory
that you see in attached image.
Can you please advise what changes I should do - probably with the libraries..many thanks
#include <WProgram.h>
#include <Wire.h>
#include <E24C1024.h>
#include <EEPROM.h>
byte inByte; // Where to store the Bytes read
int ledPin = 13; // Set the pin to digital I/O
int index = 0;
int addr = 0;
int pass = 0;
void setup()
{
pinMode(ledPin, OUTPUT);
Serial.begin(9600);
}
void loop()
{
if(Serial.available() > 0)
{
inByte = Serial.read(); // Read a Byte
int val = inByte;
EEPROM1024.write(addr, val);
addr = addr + 1;
if (addr == 676)
addr = 0;
Serial.print("At the position ");
Serial.print(index);
Serial.print(" arduino received: ");
Serial.println(inByte,DEC);
index++;
Serial.print("At the position ");
Serial.print(addr-1);
Serial.print(" of EEPROM I wrote: ");
Serial.print(val,DEC);
Serial.println();
}
}