- Mon Nov 08, 2010 9:22 pm
#113037
Hello,
I've been seeing some conflicts with some other libraries which include the Arduino Pin Definitions (pins_arduino.h). After some backtracking the issues I found out that you actually define MOSI, MISO, SCK again which causes conflicts with other libraries.
I have changed _Spi.h to remove the defines and instead include pins_arduino.h and that has improved compatibility. Edit: The other thing that must be done is to use CS instead of SS in _Spi.cpp.
I've updated my [very experimental] library here to include these changes: https://github.com/Encryptic/WiFly-Library
Also, this change should support for the Arduino Mega 2560, however, I don't own one to test on.
Another thing I was thinking about was a way to define the crystal frequency usage so that users of the library do not have to modify the library, the reason I don't like this is every time I pull the latest library my code no longer works because I have the older version of the shield. Anyone have any thoughts of how we could clean this up? It could be switched to a variable and add an overload to the WiFly.begin method which will allow us to change the crystal frequency, then when we update the library it will no longer silently fail.
I've been seeing some conflicts with some other libraries which include the Arduino Pin Definitions (pins_arduino.h). After some backtracking the issues I found out that you actually define MOSI, MISO, SCK again which causes conflicts with other libraries.
I have changed _Spi.h to remove the defines and instead include pins_arduino.h and that has improved compatibility. Edit: The other thing that must be done is to use CS instead of SS in _Spi.cpp.
I've updated my [very experimental] library here to include these changes: https://github.com/Encryptic/WiFly-Library
Also, this change should support for the Arduino Mega 2560, however, I don't own one to test on.
Another thing I was thinking about was a way to define the crystal frequency usage so that users of the library do not have to modify the library, the reason I don't like this is every time I pull the latest library my code no longer works because I have the older version of the shield. Anyone have any thoughts of how we could clean this up? It could be switched to a variable and add an overload to the WiFly.begin method which will allow us to change the crystal frequency, then when we update the library it will no longer silently fail.