adafruit/Adafruit_CC3000_Library

Possible to use TextFinder?

memelab74 opened this issue · 4 comments

I saw that you recently closed Issue #19 which adds support for the Client class which inherits from stream. I was hoping that this would allow me to use TextFinder (http://playground.arduino.cc/Code/TextFinder) which requires a Stream object, but I'm still not having any luck:

The following code snippet:
Adafruit_CC3000_Client client = cc3000.connectTCP(ip, port);
TextFinder finder(client);

results in the following error:
error: no matching function for call to 'TextFinder::TextFinder(Adafruit_CC3000_Client&, int)'

Do the most recent changes still not support use of code like TextFinder or is there possibly something specifically wrong with the way I've tried to call it.

Apologies if this is not the proper place to seek this kind of support. Happy to redirect.

Thank you.
George

Do you mind sharing the full sketch? I grabbed TextFinder and tried something similar in the WebClient example by changing it to:

Adafruit_CC3000_Client www = cc3000.connectTCP(ip, 80);
TextFinder finder(www);
finder.find("test");

It seems to compile without any errors for me (using Arduijno 1.5.6-r2). (note the code won't really do anything since it's expecting a web server to immediately respond with 'test'--would probably just hang, but is a quick test to see if it compiles)

Potential bonehead mistake. I renamed the directory containing the old
library but left it in the libraries directory. I think that the compiler
was finding both libraries and may have been using the older version.
Removing the old directory and restarting the IDE seemed to do the trick.

For what it's worth, I was using Arduino 1.0.5, but the issue of it
possibly sourcing multiple libraries with the same name was only reported
through errors in Arduino 1.5.6.

Sorry about that. Thank you for taking the time to review this. This is a
great upgrade and will really make the library play nice with a lot of
other work out there.

On Tue, Aug 19, 2014 at 6:43 PM, Tony DiCola notifications@github.com
wrote:

Do you mind sharing the full sketch? I grabbed TextFinder and tried
something similar in the WebClient example by changing it to:

Adafruit_CC3000_Client www = cc3000.connectTCP(ip, 80);
TextFinder finder(www);
finder.find("test");

It seems to compile without any errors for me (using Arduijno 1.5.6-r2).
(note the code won't really do anything since it's expecting a web server
to immediately respond with 'test'--would probably just hang, but is a
quick test to see if it compiles)


Reply to this email directly or view it on GitHub
#96 (comment)
.

Oh no problem, glad to hear it compiles. I'm actually kind of curious to hear if it works when you use the TextFinder class. In theory everything is hooked up correctly and I tested out the Client use with an ethernet shield example, but it would be great to hear if other things like TextFinder work. Let me know how it works for you, thanks!

Confirming: TextFinder does work with the new code! Thank you so much!

On Tue, Aug 19, 2014 at 11:25 PM, Tony DiCola notifications@github.com
wrote:

Oh no problem, glad to hear it compiles. I'm actually kind of curious to
hear if it works when you use the TextFinder class. In theory everything is
hooked up correctly and I tested out the Client use with an ethernet shield
example, but it would be great to hear if other things like TextFinder
work. Let me know how it works for you, thanks!


Reply to this email directly or view it on GitHub
#96 (comment)
.