How to control servo motor with handphone through GSM modem?


Closed Thread
Results 1 to 11 of 11

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,172

    Default

    I would strongly suggest to use hardware USART and if possible interrupts like Darrels Instant Interrupts. It will assure you no lost characters.

    Secondly, I see that you are not checking if the modem has replied with OK or an error, except once. Not all commands have the same processing time. So it is a good practise to confirm that the device has accepted succesfully the command by monitoring its response.

    Ioannis

  2. #2
    Join Date
    May 2008
    Posts
    7

    Default

    Quote Originally Posted by Ioannis View Post
    I would strongly suggest to use hardware USART and if possible interrupts like Darrels Instant Interrupts. It will assure you no lost characters.

    Secondly, I see that you are not checking if the modem has replied with OK or an error, except once. Not all commands have the same processing time. So it is a good practise to confirm that the device has accepted succesfully the command by monitoring its response.

    Ioannis
    I've used an open source software called " real term" to test out the serial cable

    The following are the codes i used to test:

    Code:
        Serout2 Tx,84,["Ready:",13]
    	pause 500
    	Serin2 rx,84,[wait("A="),B0]				
    	Pause 500
        Serout2 PORTC.6,84,["Got: ",B0,13]
    	pause 500
    	goto init
    It's working. Now I need to test the GSM modem using SEROUT2 and SERIN2 commands. Anyone knows how?

  3. #3
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,172

    Default

    Any special need to use Serin2/Serout2 instead of Hseri/Hserout?

    Ioannis

  4. #4
    Join Date
    May 2008
    Posts
    7

    Default

    Quote Originally Posted by Ioannis View Post
    Any special need to use Serin2/Serout2 instead of Hseri/Hserout?

    Ioannis
    What are the differences between serin2/serout2 and hserin/hserout?

    How can I use either set of commands to capture sms message?

  5. #5
    skimask's Avatar
    skimask Guest

    Default

    Quote Originally Posted by supertyx View Post
    What are the differences between serin2/serout2 and hserin/hserout?
    How can I use either set of commands to capture sms message?
    Guess where the answer is?
    (could be in post #8, but it's not!)

    EDIT: Looks like the post I was referring to (i.e. spam) got deleted (Thx admins).
    Let me change that to:
    See post #10...
    Last edited by skimask; - 22nd May 2008 at 01:06.

  6. #6
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,172

    Default

    1. Software vs Hardware. Is that clear enough?

    2. If you do not know how to use these commands, then sorry, I cannot teach you PicBasic Pro lanquage. You have to do it yourself, and if you face a problem, then come here to show your code and be sure many will help you debug it.

    3. The GSM thread has many resources for the matter. Just read...

    Ioannis

  7. #7
    Join Date
    May 2008
    Posts
    7

    Default

    I can send sms using at commands:

    Code:
    pause 1000
    LCDOUT $Fe,01, "Sending Now.."
    PAUSE 2000
    serout2 Tx,84,["AT+CMGS=",34,"Put hp number here",34,13]
    pause 1000
    serout2 TX,84,["How are you?",26]
    'pause 1000
    lcdout $Fe,01, "Message sent"
    PAUSE 2000
    LCDOUT $Fe,01, "STOP"
    stop
    Now i want to write a program to receive sms. What are the codes needed to be edited/added?

Similar Threads

  1. More Servo Woes
    By chrisshortys in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 13th May 2009, 09:40
  2. Help with Servo Control Please!
    By wireman22 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 7th June 2007, 19:15
  3. SEROUT2 to GSM Modem
    By tommyers in forum General
    Replies: 5
    Last Post: - 21st August 2006, 22:35
  4. Servo control woes
    By Eriswerks in forum mel PIC BASIC Pro
    Replies: 24
    Last Post: - 28th February 2006, 01:12
  5. Control RC servo via Parallax Servo Control
    By cibotsan in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 17th September 2005, 09:18

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts