Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C
Assalmoalaikum. I want to ask that iam designing my fyp based on arduino microcontroller. In that I want to switch on the motor for 15 minutes by sending sms. I am using sim 900 gsm shield and arduino mega 2560 microcontroller and I have connected my gsm shield with arduino and also a debugger(based on terminal software) to check the response in gsm shield I am using this pgm
 
// give it a name:
unsigned int led = 13;
 
void setup() 
{ 
  // initialize the digital pin as an output.
  pinMode(led, OUTPUT);
  
  //Initialize serial and wait for port to open:
  Serial1.begin(9600);
  Serial2.begin(9600);
  Serial2.println("Hello Computer");
} 
 
void loop() 
{   
    //digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
    ///delay(50);               // wait for a second
    //digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
    //delay(50);               // wait for a second 
    
    // read from port 2, send to port 1:
    if (Serial2.available()) 
    {      
      //Serial2.print(inByte);
      Serial1.write(Serial2.read());  
    } 
    
    // read from port 1, send to port 2:
    if (Serial1.available()) 
    {
         Serial2.write(Serial1.read());           
    }   
} 
 

 
I am getting all the responses. Now I need the code that will make my arduino to compare my cell number and after that it would switch on the motor. After reading my sms "switch on the moter" through pwm pins of arduino.... I have been struggling for a month, please help me.
Posted 27-Feb-13 5:56am
Edited 27-Feb-13 6:02am
34K
v2
Comments
richcb at 27-Feb-13 12:04pm
   
I am sure it is just a language barrier, but calling everyone "mam" is assuming that all on this site are females. Same this with using "sir", it assumes that all members are male. Just a friendly note on using those words, it is best not to.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 534
1 Gihan Liyanage 298
2 RyanDev 260
3 Sergey Alexandrovich Kryukov 223
4 Richard Deeming 185
0 Sergey Alexandrovich Kryukov 8,936
1 OriginalGriff 7,891
2 CPallini 2,603
3 Richard MacCutchan 2,121
4 Abhinav S 1,928


Advertise | Privacy | Mobile
Web02 | 2.8.140827.1 | Last Updated 27 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100