Reading an email.

Hi

If you'd be wanting to create a int searchSerialBuffer(char * searchTerm1, char * searchTerm2) which would search for the first occurrence of either term, and return a value for which it found, that's entirely possible. The only caveat that springs to mind is that the terms passed shouldn't be substrings of each other.

Can you give an example of what you'd be looking to do?

Geoff

zoomkat:
The issue as I understand it, in the two often referenced discussions, is said to possibly occurr in sub routines using Strings where used memory is normally expected to be freed when the sub routine is exited is not released.

That may be part of the issue, but memory fragmentation is another huge issue.

[/quote]I have yet to see any issues in simple code using Strings actually be corrected by changing to strings.[/quote]

Neither have I. I've also yet to see issues with using delay() to blink an LED but have seen plenty of issues with people using delay() in larger projects. Why not take a little bit of time to learn the alternative that isn't going to cause issues down the road?

Read the discussions and form your opinion.

I have and have, it's just different than yours.

zoomkat:
I'm curious as to how the streaming data stream would be searched for more than one data string without being very cumbersome.

I'd approach this by implementing a statefull filter class which was configured with the string/pattern of interest and had the incoming character stream fed through it. The internal state of each instance would record how far through the pattern had been matched so far, for example with a simple string match it would record the number of characters that had been matched. You could apply as many of these to the incoming stream as you wanted, and have control over the precedence between them (i.e. if one filter is matched, do you continue to apply other filters).

Why not take a little bit of time to learn the alternative that isn't going to cause issues down the road?

My issue is that 1) most of the time the "don't use Strings" statements come from very knowledgable persons who never correct the code at hand to show the newbie the alternative to using Strings, and 2) adding confusion to code troubleshooting by telling the newbie to not use Strings when Strings has nothing to do with the code issue at hand. These people never seem to walk their talk. Sad...

I don't think that somebody recommending the use of c-strings has any obligation to provide a tutorial on how to use them, or to do the work themselves to make that change. C-strings and the runtime functions to manipulate them are ubiquitous and widely documented - unlike the Arduino String class which is unique to Arduino. As for knowing whether the use of Strings is contributing to the problem - given the way that subtle changes in the use of dynamic memory can dramatically influence the way the problem manifests, I don't see that it is feasible to say with any certainty whether String is or is not causing a given problem. Removing the use of String is a sensible step anyway if the sketch is behaving unexpectedly. It might cure the problem. If it doesn't, at least it rules that out as a potential cause and also eliminates the risk that future changes to the sketch will expose String problems.

Read the discussions and form your opinion.

I have. It is my opinion that you are wrong. Not just wrong, but stubbornly wrong.

So I finally had a chance to sit down and read all your replies and as much as I enjoyed the strings vs array battle that ensued, I think I should clarify my original post. Parsing the email for the line and determining the contents wasn't so much my issue, but I'm glad you all had plenty of opinions on the best way to go about that. I more need a nudge for how to actually get the email stored into the Arduino to be able to read it. I am not very familiar with how Arduino accesses the mailbox and how it can get retrieve the actual email. Once I can get the block of text into the Arduino, I should be good, but I have never tried accessing email from anything but a web browser and I'm not really sure where to start. (also pasting this into the original post)

Hi,

What are you using to connect the Arduino to the interwebs? Do you have the Ethernet shield yet, or is that something open for options also?

Geoff

Take a look at this,http://www.instructables.com/id/Arduino-Ethernet-Shield-Tutorial/step5/Client/

strykeroz:
What are you using to connect the Arduino to the interwebs? Do you have the Ethernet shield yet, or is that something open for options also?

I am currently using the Ethernet shield on loan from a friend as I wait for mine to come in. (free shipping is great, but slow as molasses.) I have also gotten the suggestion to use a Raspberry Pi as the connection and parser, and use the Arduino for the peripheral control, but I am always open to new suggestions if you know of an alternative way.

I am using Yandex mail for the official purpose and it is really the best platform for free email service but from few days I am facing issue with it, yandex mail not working but cannot able to understand why such an error is occurring. Can anyone tell me the valid reason and also any suggestion to solve this issue?