Hi,
today I've upgraded to AtmelStudio 6 with Arduino Extension. My own projects work great in there. Code browsing is much more easy, and digging into the libraries also.
But I have encountered one strange problem:
When I tried to compile the PCF8574 example from GitHub - skywodd/pcf8574_arduino_library: PCF8574 / PCF8575 Arduino library (version 2.0) it will work in the Arduino IDE but not in Studio.
IDE:
Compiling 'ButtonBlink' for 'Arduino Uno'
ButtonBlink.ino:16:9: error: no matching function for call to 'PCF8574::PCF8574()'
ButtonBlink.ino:candidates are
PCF8574.h:PCF8574(int)
PCF8574.h:candidate expects 1 argument, 0 provided
PCF8574.h:PCF8574(const PCF8574&)
PCF8574.h:candidate expects 1 argument, 0 provided
ButtonBlink.ino:In function 'void setup()'
ButtonBlink.ino:25:12: error: 'class PCF8574' has no member named 'begin'
ButtonBlink.ino:28:12: error: 'class PCF8574' has no member named 'pinMode'
ButtonBlink.ino:29:12: error: 'class PCF8574' has no member named 'pinMode'
ButtonBlink.ino:30:12: error: 'class PCF8574' has no member named 'pinMode'
ButtonBlink.ino:31:12: error: 'class PCF8574' has no member named 'pinMode'
ButtonBlink.ino:34:12: error: 'class PCF8574' has no member named 'enableInterrupt'
ButtonBlink.ino:37:12: error: 'class PCF8574' has no member named 'attachInterrupt'
ButtonBlink.ino:38:12: error: 'class PCF8574' has no member named 'digitalWrite'
ButtonBlink.ino:In function 'void ISRgateway()'
ButtonBlink.ino:43:12: error: 'class PCF8574' has no member named 'checkForInterrupt'
ButtonBlink.ino:In function 'void ISRdemo()'
ButtonBlink.ino:53:19: error: no matching function for call to 'PCF8574::toggle()'
ButtonBlink.ino:candidate is
PCF8574.h:toggle(uint8_t)
PCF8574.h:candidate expects 1 argument, 0 provided
ButtonBlink.ino:In function 'void loop()'
ButtonBlink.ino:63:12: error: 'class PCF8574' has no member named 'blink'
ButtonBlink.ino:65:12: error: 'class PCF8574' has no member named 'blink'
ButtonBlink.ino:69:12: error: 'class PCF8574' has no member named 'digitalWrite'
ButtonBlink.ino:71:12: error: 'class PCF8574' has no member named 'digitalWrite'
ButtonBlink.ino:73:12: error: 'class PCF8574' has no member named 'digitalWrite'
ButtonBlink.ino:75:12: error: 'class PCF8574' has no member named 'digitalWrite'
ButtonBlink.ino:93:12: error: 'class PCF8574' has no member named 'detachInterrupt'
ButtonBlink.ino:95:27: error: 'class PCF8574' has no member named 'digitalRead'
ButtonBlink.ino:96:32: error: no matching function for call to 'PCF8574::read()'
ButtonBlink.ino:candidate is
PCF8574.h:read(uint8_t)
PCF8574.h:candidate expects 1 argument, 0 provided
ButtonBlink.ino:97:12: error: 'class PCF8574' has no member named 'attachInterrupt'
Error compiling
In No. 16 the instance should be created:
PCF8574 expander;
Here is minimal code that should work (works in A-IDE) if you install the library:
#include <Wire.h> // Required for I2C communication
#include "PCF8574.h" // Required for PCF8574
PCF8574 expander;
void setup() {
expander.begin(0x20);
}
void loop() {
}
Again Atmel Studio complains:
Compiling 'ButtonBlink' for 'Arduino Uno'
ButtonBlink.ino:4:9: error: no matching function for call to 'PCF8574::PCF8574()'
ButtonBlink.ino:candidates are
PCF8574.h:PCF8574(int)
PCF8574.h:candidate expects 1 argument, 0 provided
PCF8574.h:PCF8574(const PCF8574&)
PCF8574.h:candidate expects 1 argument, 0 provided
ButtonBlink.ino:In function 'void setup()'
ButtonBlink.ino:7:12: error: 'class PCF8574' has no member named 'begin'
Error compiling
I appreciate any help...
Matthias
Edit: Quick link to the library: