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
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;
if(Serial.available() > 0)
inByte = Serial.read(); // Read a Byte
int val = inByte;
addr = addr + 1;
if (addr == 676)
addr = 0;
Serial.print("At the position ");
Serial.print(" arduino received: ");
Serial.print("At the position ");
Serial.print(" of EEPROM I wrote: ");
btw I have already changed the first line to:
but I still get the error.
any hint highly appreciated.
The compiler is telling you the file that is causing the problem. Change the include statement in that file to include Arduino.h, instead.
many thanks!!!this is fixed but I still get many errors.
They has to do with the replacement of send() and receive() with read() and write().
But in which file do I substitute this code?In which file should I substitute send() for read()?
I also don’t understand the first error:
/Applications/Arduino.app/Contents/Resources/Java/libraries/E24C1024/E24C1024.cpp: In static member function ‘static void E24C1024::write(long unsigned int, uint8_t)’:
any help very appreciated.
Below is the code of wire.h but where are the files inttypes.h & Stream.h located? Are in these files the send() & receive() that have to be replaced?thx!
#define BUFFER_LENGTH 32
class TwoWire : public Stream
static uint8_t rxBuffer;
static uint8_t rxBufferIndex;
static uint8_t rxBufferLength;
static uint8_t txAddress;
static uint8_t txBuffer;
static uint8_t txBufferIndex;
static uint8_t txBufferLength;
static uint8_t transmitting;
static void (*user_onRequest)(void);
static void (*user_onReceive)(int);
static void onRequestService(void);
static void onReceiveService(uint8_t*, int);
uint8_t requestFrom(uint8_t, uint8_t);
uint8_t requestFrom(int, int);
virtual size_t write(uint8_t);
virtual size_t write(const uint8_t *, size_t);
virtual int available(void);
virtual int read(void);
virtual int peek(void);
virtual void flush(void);
void onReceive( void (*)(int) );
void onRequest( void (*)(void) );
extern TwoWire Wire;
Your problem should be solved if you look up this solution at Google Sites: Sign-in
"When compile an Arduino Library, it fails to compile with the message:
error: WConstants.h: No such file or directory
The solution is to delete the line
and then in the .h file, add the following:
#if ARDUINO >= 100
This way, the code will compile, and it will be compatible to Arduino 0023 and 1.0 versions."
Wow that last post saved my butt,on hat one finally got Timer2 test to compile
Yes you have to type #include <Arduino.h> instead #include <WProgram.h> or #include <WStructure.h>
I did this modifications in JArduino projects, that’s amazing …
The file revisions.txt in the top level of the Arduino distribution chronicals all the changes
between versions - normally you would glance through this when you install a newer
version to see what's changed - you'll see all these changes are mentioned.
their has problem with ps2dev library
C:\Users\COMPAQ\Documents\Arduino\libraries\ps2dev/ps2dev.h:12:24: fatal error: WConstants.h: No such file or directory what should i do
what should i do
Instead of just finding this thread and tacking the same question on the end, try actually reading the thread.