-
Notifications
You must be signed in to change notification settings - Fork 516
WiFiClient option #284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Ideally the various WiFi streams would have been combined from the beginning. The issue is however that each needs to include a different WiFi library. Arduino precompiles libraries (in that everything in the Firmata library directory is compiled into object files when the Arduino IDE is opened and then the sketch is compiled later by the user) and thus there was no way to indicate from the sketch or wifiConfig.h file which specific Wi-Fi library should be included - even though that was the only difference between versions. However since we moved the stream implementation from the .cpp to the .h file, this may have actually prevented pre compilation of the wifi stream classes and including the specific Wi-Fi library in wifiConfig.h may actually work (funny I never tried that). Is that what you have in mind? |
Please submit a PR with what you have so far. |
@jnsbyr FYI For the next leg of work (ability to use Wi-Fi server or client), I've created a new topic branch named Thanks for all of your work on this so far!! |
No problem, I hope that it is useful for the project. I will checkout the new branch. Thanks for all the testing you needed to do, but currently I am limited to a Huzzah ESP8266. |
I recommend the MKR1000 if you are looking into getting another WiFi board. It uses the WiFi101 library so it's a good test case. |
done! #292 |
Currently StandardFirmataWiFi has no WiFiClient option and there was a request for contribution in #280 (comment).
I have compared the 3 versions of WiFiStream (WiFi, WiFi100 and ESP). They are nearly identical and they can easily be combined into a single WiFiStream class without changing the interface for WiFi and WiFi100 using defines for the ESP subset and making the appropriate changes to the StandardFirmataWiFi example. Reducing the variants first will help providing a WiFiClient option for all variants.
The new version of WiFiStream has been successfully compiled for an Arduino with WiFi and for an ESP8266. I could commit and push this intermediary solution for further discussion. It still needs testing though, because I have a host application that can only be a server.
For adding the WiFiClient there are at least two options:
The text was updated successfully, but these errors were encountered: