Hi, using arduino uno r3 and sim900 shield to receive sms's and switch on on board L.E.D,with the sketch below,i am able to read all sms's pefectly but i need to capture the data and activate an output,if i sms the word on tothe shield,pin13 must go high,please help complete the sketch.thank you.

/** Copyright (C) 2012 Libelium Comunicaciones Distribuidas S.L.* http://www.libelium.com** This program is free software: you can redistribute it and/or modify* it under the terms of the GNU General Public License as published by* the Free Software Foundation, either version 3 of the License, or* (at your option) any later version.** This program is distributed in the hope that it will be useful,* but WITHOUT ANY WARRANTY; without even the implied warranty of* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the* GNU General Public License for more details.** You should have received a copy of the GNU General Public License* along with this program. If not, see .** Version 0.1* Author: Alejandro Gállego*/

int led = 13;int onModulePin = 9; // the pin to switch on the module (without press on button)

i view all sms's using serial monitor, in my serial monitor it shows thecontents of the sms received by the shield,when i sms on, the word onshows up on the serial monitor,what i really want to achieve isto switch on the on board led when i sms the word 'on' to the shield and off to turn the led off ,in stand alone mode

Are you talking to the phone on the serial port, or the Serial Monitor? You seem to be trying to do both.

You may not have realized the significance of this comment from PaulS.

You can only have one device at each end of the serial link. Your sketch is using the Arduino's hardware serial port to talk to the GSM shield. You must not connect anything else to the same serial port. The USB/Serial connection to the host PC uses the same serial port so you must not connect the USB lead at the same time as the shield is connected; that would result in both sources trying to drive the same serial Tx/Rx lines which is a bad idea.

I only provide help via the forum - please do not contact me for private consultancy.

o yes, now i realize there could be conflict when sharing the tx and rx,maybe thats why some of my previous attempts ended in failure.thanks.i am still trying to figure out how the Strcmp string works and how i would use itin my application to compare sms's.