I'm working on a library which connect Arduino with an Android device,
I'm getting crazy trying to make a single library able to use the Serial or the Network starting from the user choice...
I try to explain better,
- AndroidDEV.h and AndroidDEV.cpp which defines a common class "AndroidDev"
useful in order to manage the Android phone/tablet
- AndoidBT.h and AndroidBT.cpp which extends the "AndroidDev" class including some specialization regarding the transport by BlueTooth (trough the Hardware Serial)
- AndoidNET.h and AndroidNET.cpp which extends the "AndroidDev" class including some specialization regarding the transport by Network.
My Goal is enable the user to choice only one of transports, eg.
Building the BT example as the IDE uses all "cpp" files that are inside the directory, shows errors building the "AndroidNET.cpp" file...
In file included from /opt/arduino-1.0.3/libraries/mylibrary/AndroidNET.cpp:21:
/opt/arduino-1.0.3/libraries/mylibrary/AndroidNET.h:38: error: ‘EthernetClient’ has not been declared
/opt/arduino-1.0.3/libraries/mylibrary/AndroidNET.h:44: error: ISO C++ forbids declaration of ‘EthernetClient’
I'd like to avoid using two different libraries
Can anyone help me?