Trying to use the following project downloaded from here:
Using Intel Edison board with MPU9150 connected to it. Arduino compiles and uploads succesfully the sample projects on that board, but this projects is not compiling showing the following errors shown below.
Something wrong with I2Cdev.cpp? How that can be fixed?
Thank you.
sketch/I2Cdev.cpp: In static member function 'static boolean Fastwire::waitInt()':
I2Cdev.cpp:718: error: 'TWCR' was not declared in this scope
while (!(TWCR & (1 << TWINT)) && l-- > 0);
^
I2Cdev.cpp:718: error: 'TWINT' was not declared in this scope
while (!(TWCR & (1 << TWINT)) && l-- > 0);
^
sketch/I2Cdev.cpp: In static member function 'static void Fastwire::setup(int, boolean)':
I2Cdev.cpp:723: error: 'TWCR' was not declared in this scope
TWCR = 0;
......etc
I2Cdev.cpp:789: error: 'TWDR' was not declared in this scope
TWDR = address; // send data to the previously addressed device
^
I2Cdev.cpp:790: error: 'TWCR' was not declared in this scope
TWCR = (1 << TWINT) | (1 << TWEN);
^
I2Cdev.cpp:790: error: 'TWINT' was not declared in this scope
TWCR = (1 << TWINT) | (1 << TWEN);
^
I2Cdev.cpp:790: error: 'TWEN' was not declared in this scope
TWCR = (1 << TWINT) | (1 << TWEN);
^
I2Cdev.cpp:792: error: 'TWSR' was not declared in this scope
twst = TWSR & 0xF8;
^
sketch/I2Cdev.cpp: In static member function 'static byte Fastwire::write(byte)':
I2Cdev.cpp:812: error: 'TWDR' was not declared in this scope
TWDR = value; // send data
^
I2Cdev.cpp:813: error: 'TWCR' was not declared in this scope
TWCR = (1 << TWINT) | (1 << TWEN);
^
I2Cdev.cpp:813: error: 'TWINT' was not declared in this scope
TWCR = (1 << TWINT) | (1 << TWEN);
^
I2Cdev.cpp:813: error: 'TWEN' was not declared in this scope
TWCR = (1 << TWINT) | (1 << TWEN);
^
I2Cdev.cpp:815: error: 'TWSR' was not declared in this scope
twst = TWSR & 0xF8;
^
sketch/I2Cdev.cpp: In static member function 'static byte Fastwire::readBuf(byte, byte, byte*, byte)':
I2Cdev.cpp:825: error: 'TWCR' was not declared in this scope
TWCR = (1 << TWINT) | (1 << TWEN) | (1 << TWSTO) | (1 << TWSTA);
^
.... it goes on
I2Cdev.cpp:851: error: 'TWSTO' was not declared in this scope
TWCR = (1 << TWINT) | (1 << TWEN) | (1 << TWSTO) | (1 << TWSTA);
^
I2Cdev.cpp:851: error: 'TWSTA' was not declared in this scope
TWCR = (1 << TWINT) | (1 << TWEN) | (1 << TWSTO) | (1 << TWSTA);
^
I2Cdev.cpp:869: error: 'TWEA' was not declared in this scope
TWCR = (1 << TWINT) | (1 << TWEN) | (1 << TWEA);
^
sketch/I2Cdev.cpp: In static member function 'static void Fastwire::reset()':
I2Cdev.cpp:884: error: 'TWCR' was not declared in this scope
TWCR = 0;
^
sketch/I2Cdev.cpp: In static member function 'static byte Fastwire::stop()':
I2Cdev.cpp:888: error: 'TWCR' was not declared in this scope
TWCR = (1 << TWINT) | (1 << TWEN) | (1 << TWSTO);
^
I2Cdev.cpp:888: error: 'TWINT' was not declared in this scope
TWCR = (1 << TWINT) | (1 << TWEN) | (1 << TWSTO);
^
I2Cdev.cpp:888: error: 'TWEN' was not declared in this scope
TWCR = (1 << TWINT) | (1 << TWEN) | (1 << TWSTO);
^
I2Cdev.cpp:888: error: 'TWSTO' was not declared in this scope
TWCR = (1 << TWINT) | (1 << TWEN) | (1 << TWSTO);
^
exit status 1
'TWCR' was not declared in this scope