Hey!
I'm working on a project and I'm basically trying to get a motor to trigger when a certain keyword is picked up on an RSS feed. I initially started with a Servo Motor but I've had no luck with two so far so thinking about changing to a stepper motor - either way, not the issue.
I'm looking for some pointers to help get my code together at the moment as I only have pieces right now.
I'm using an Ethernet Shield and at the moment connecting to http://open.live.bbc.co.uk/weather/feeds/en/2649715/3dayforecast.rss. Using the Arduino example "WebClient" I can connect and return data in the Serial Monitor. I guess my first question would be is this the correct way to go about what I want to do (using WebClient, as I can see that it does disconnect after retrieving the HTML - Should I be reguarly saving it to a local text file?).
I then am going to read the data and trigger a motor (but for the time being, an LED) based on a certain keyword on the feed.
I'd like to think I'm on the right track but not totally sure with a few things.
Am I right in thinking that while connected to the server (with the HTML retrieved) I need to use a loop to sit and wait until a keyword is triggered? Something that may include something like:
String keyword;
while(Serial.available()==0) {}
keyword = Serial.readString("sunny");
So with the String declared, using 'while' to wait until the keyword "sunny" is found and is saved under the String variable 'keyword'
Aha I'm not too sure but I hope I'm at least partially on the right track! I am still pretty new to the Arduino environment - but any help is greatly appreciated even if it you just point me to a tutorial elsewhere that I've missed (I have looked, I promise!).
Cheers
Arthur