Well, now i copied the libraries folder with al the libraries from the users/arduino/libraries folder (default arduino sketchbook folder) to the aforementioned OPTIONALLY ENTER A SKETCHBOOK LOCATION of visual micro. Now the libraries are show on Project / add / import library / User So i select to import one from adafruit, then visual miccro adds "#include <Adafruit_ILI9341.h>" Now i got a lot of errors, well the file was found (i mean, no not found error) but i get: Adafruit_ILI9341.h:100: error: expected class-name before '{' token Adafruit_ILI9341.cpp:In file included from Adafruit_ILI9341.h:100: error: expected class-name before '{' token Adafruit_ILI9341.cpp:In constructor 'Adafruit_ILI9341::Adafruit_ILI9341(int8_t, int8_t, int8_t, int8_t, int8_t, int8_t)' Adafruit_ILI9341.cpp:25: error: class 'Adafruit_ILI9341' does not have any field named 'Adafruit_GFX' Adafruit_ILI9341.cpp:In constructor 'Adafruit_ILI9341::Adafruit_ILI9341(int8_t, int8_t, int8_t)' Adafruit_ILI9341.cpp:38: error: class 'Adafruit_ILI9341' does not have any field named 'Adafruit_GFX' Adafruit_ILI9341.cpp:In member function 'void Adafruit_ILI9341::begin()' Adafruit_ILI9341.cpp:161: error: 'SPI' was not declared in this scope Adafruit_ILI9341.cpp:162: error: 'SPI_CLOCK_DIV2' was not declared in this scope Adafruit_ILI9341.cpp:164: error: 'SPI_MODE0' was not declared in this scope Adafruit_ILI9341.cpp:In member function 'void Adafruit_ILI9341::drawPixel(int16_t, int16_t, uint16_t)' Adafruit_ILI9341.cpp:352: error: '_width' was not declared in this scope Adafruit_ILI9341.cpp:352: error: '_height' was not declared in this scope Adafruit_ILI9341.cpp:In member function 'void Adafruit_ILI9341::drawFastVLine(int16_t, int16_t, int16_t, uint16_t)' Adafruit_ILI9341.cpp:373: error: '_width' was not declared in this scope Adafruit_ILI9341.cpp:373: error: '_height' was not declared in this scope Adafruit_ILI9341.cpp:375: error: '_height' was not declared in this scope Adafruit_ILI9341.cpp:In member function 'void Adafruit_ILI9341::drawFastHLine(int16_t, int16_t, int16_t, uint16_t)' Adafruit_ILI9341.cpp:400: error: '_width' was not declared in this scope Adafruit_ILI9341.cpp:400: error: '_height' was not declared in this scope Adafruit_ILI9341.cpp:401: error: '_width' was not declared in this scope Adafruit_ILI9341.cpp:In member function 'void Adafruit_ILI9341::fillScreen(uint16_t)' Adafruit_ILI9341.cpp:418: error: '_width' was not declared in this scope Adafruit_ILI9341.cpp:418: error: '_height' was not declared in this scope Adafruit_ILI9341.cpp:In member function 'void Adafruit_ILI9341::fillRect(int16_t, int16_t, int16_t, int16_t, uint16_t)' Adafruit_ILI9341.cpp:426: error: '_width' was not declared in this scope Adafruit_ILI9341.cpp:426: error: '_height' was not declared in this scope Adafruit_ILI9341.cpp:427: error: '_width' was not declared in this scope Adafruit_ILI9341.cpp:428: error: '_height' was not declared in this scope Adafruit_ILI9341.cpp:In member function 'void Adafruit_ILI9341::setRotation(uint8_t)' Adafruit_ILI9341.cpp:467: error: 'rotation' was not declared in this scope Adafruit_ILI9341.cpp:471: error: '_width' was not declared in this scope Adafruit_ILI9341.cpp:472: error: '_height' was not declared in this scope Error compiling So it does not work, this is maybe a problem with my file that its a class or what, why that errores ?? My project consist on //d1.ino #include <Adafruit_ILI9341.h> //added by visual micro #include "Arduino.h"; #include "Action.h"; #include "Run.h"; /* ITEAD */ int dirPin1 = 3; int stepperPin1 = 2; int dirPin2 = 7; int stepperPin2 = 6; void setup(){ /* ITEAD */ pinMode(dirPin1, OUTPUT); pinMode(stepperPin1, OUTPUT); pinMode(dirPin2, OUTPUT); pinMode(stepperPin2, OUTPUT);} void loop(){Run run = Run(dirPin1,stepperPin1,dirPin2,stepperPin2);} //run.h #ifndef Run_h #define Run_h #include "Arduino.h" class Run { public: typedef enum eWindow {HOME = 0}; typedef enum eUserAction {NOTHING = 0, GOABOUT = 1, GOPRESETS = 2}; Run(void); Run(int dirPin1, int stepperPin1, int dirPin2 , int stepperPin2); void step(boolean dir,int steps, int dirPin1, int stepperPin1, int dirPin2, int stepperPin2); void listenUser(); }; #endif //run.cpp #include "Arduino.h" #include "Run.h" #include "Util.h" Run::eWindow currentWindow = Run::HOME; Run::eUserAction userAction = Run::NOTHING; void Run::listenUser(){ //I CANNOT USE THIS CODE CAUSE I NEED THE LIBRARY <Adafruit_ILI9341.h> WORKING, AND IT IS NOT // i need to use: //Adafruit_STMPE610 ts = Adafruit_STMPE610(STMPE_CS); //that object comes from that library //if (!ts.bufferEmpty()) { //userAction==Run::GOABOUT; //} } etc .. WHY ? SOLUTION ?
|