Thread: Water level sensor

  1. #76
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by Aneesha View Post
    1) No.The microcontroller that i am using is wireless device, msp430 which is eZ430-RF2500.
    2) No.My microcontroller is not connected to RS232. RS232 is from GPRS modem which is connected back of the CPU.
    3) Yes. The microcontroller is connected by USB to the Computer to download the programme into msp430.
    4)Sry i don Understand the Queation. What does uC means?

    Ok, thanks for totally unhelpful answers...
    I give up.

  2. #77
    Registered User
    Join Date
    Jun 2011
    Posts
    4,513
    1) Does the microcontroller connect to your PC?
    --- 1) No. ...
    3) Does it connect by USB?
    --- 3) Yes. ...
    When it's time to close this thread, will there be an signal? Or is this it?

  3. #78
    Registered User
    Join Date
    Jun 2011
    Posts
    33
    Oh so sry i don't understand your question.

  4. #79
    Registered User
    Join Date
    May 2010
    Posts
    4,632
    This micro-controller is connected to the PC, for programming only, through the USB port. The OP has a wireless modem connected to a serial port on the PC to enable wireless communication with the micro-controller. Is this correct?

    This program you are writing is for your micro-controller. Is this correct?

    Jim

  5. #80
    Registered User
    Join Date
    Jun 2011
    Posts
    33
    Yes yes you are right.

  6. #81
    Registered User
    Join Date
    Jun 2011
    Posts
    33
    WOW 1001 VIEWS BUT I HAVE NOT GOTTEN THE ANSWER. Pls help, i really need a urgent help.

  7. #82
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    The answer to what question?
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  8. #83
    Registered User
    Join Date
    Jun 2011
    Posts
    33
    I am very new to this c programming. I would need c programming codes to send AT commands using MSP430-eZRF2500.
    MSP430 is the mirco controller im using to send sms. I need to send SMS from Computer to Handphone using iTegno GPRS Modem and AT commands. I have tried AT commands in hypertereminal and its works. Now i am not sure how to transfer the AT commands to C Language. Pls help. Thanks

  9. #84
    Registered User
    Join Date
    May 2010
    Posts
    4,632
    I thought you said that you were writing a program for your micro-controller. So now what is this talk about Hyperterminal? Hyperterminal is a Windows program. So are you working on the program that will run on your Windows PC or on your micro-controller? You keep giving conflicting answers.

    If you are working on the program that will run on the PC you can start by reading this Windows Serial Ports. This will explain how to setup and use serial ports in Windows.

    If you are working on the program that will run on your micro-controller then I suggest you start at the Manufacturer's web site. The Texas Instruments web site has many links on how to setup, program and use their micro-controller. Here is one such link: Wireless Sensor Monitoring.

    I doubt that anyone here will "give you the codes". We are here to assist you in solving the problem but it is up to you to write the actual program and ask coherent questions. This project will probably have two separate programs that you must write. One that will run on the micro-controller and one that will run on your Windows PC.

    To get reasonable answers you must provide reasonable questions. If you don't know what you are trying to accomplish how should we?

    Jim

  10. #85
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by Aneesha View Post
    I am very new to this c programming. I would need c programming codes to send AT commands using MSP430-eZRF2500.
    MSP430 is the mirco controller im using to send sms. I need to send SMS from Computer to Handphone using iTegno GPRS Modem and AT commands. I have tried AT commands in hypertereminal and its works. Now i am not sure how to transfer the AT commands to C Language. Pls help. Thanks
    You don't need program codes... you need to LEARN HOW TO PROGRAM IN C.

    Seriously... get a textbook on the C programming language, read the book, do the exercises, repeat as necessary until you understand it.

  11. #86
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    There aren't "C programming codes to send AT commands". There are functions you can call to communicate with [whatever you want to communicate with]. The fact that what you are trying to communicate are AT commands is irrelevant to actually getting the job done. You need to specify who is doing the communicating and with what. You've got a modem that understands AT commands; great. What is it plugged into? If it's plugged into the PC, then you need to write a program for the PC that talks to the port. If it's plugged in somehow to your uC, then you need to use the tools that came with that. But none of us can actually see your hardware, so it's up to you to actually check.

  12. #87
    Registered User
    Join Date
    Jun 2011
    Posts
    33
    I HAVE CAME OUT THE CODE THAT MSP430 INTERFACE PC TO SEND SMS FROM PC TO HANDPHONE USING GPRS MODEM. BUT I AM HAVEING ERRORS. I AM USING IAR EMBEDDED WORKBENCH. PLS HELP ME ON SOLVING MY ERRORS. THANKS
    Code:
    void serial_send()
     {
       ////Sets the properties of serial port object 
       serialport.PortName = COM1.SelectedItem.ToString(); 
       serialport.BaudRate = 115200; 
       serialport.Parity = Parity.None; 
       serialport.DataBits = 8; 
       serialport.StopBits = StopBits.One; 
       serialport.Handshake = Handshake.RequestToSend; 
       serialport.DtrEnable = true; 
       serialport.RtsEnable = true; 
       
       //Open the port to send sms 
       serialport.Open(); 
       serialport.WriteLine("AT+CMGF=1" + Environment.NewLine); 
       serialport.WriteLine("AT+CSCA=\"" + txtServiceNo.Text + ",145\"" + Environment.NewLine); 
       //Sets destination number  
        serialport.WriteLine("AT+CMGS=\"" + sms.DestinationNo + "\"" + Environment.NewLine); 
       //Specifies message and sends Ctrl+z 
        serialport.WriteLine(sms.Message + (char)26); 
        //Displays buffer containing output messages 
        System.Threading.Thread.Sleep(1500);
     }
    THE ERRORS ARE:
    Error[Pe020]: identifier "serialport" is undefined
    Error[Pe020]: identifier "Parity" is undefined
    Error[Pe020]: identifier "StopBits" is undefined
    Error[Pe020]: identifier "Handshake" is undefined
    Error[Pe020]: identifier "true" is undefined
    Error[Pe020]: identifier "Environment" is undefined
    Error[Pe020]: identifier "txtServiceNo" is undefined
    Error[Pe020]: identifier "sms" is undefined
    Error[Pe020]: identifier "System" is undefined
    * how to define the following errors?

  13. #88
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    That's not called "CAME OUT THE CODE".

    That's called cheating by plagiarising random code from the internet.

  14. #89
    Registered User
    Join Date
    Jun 2011
    Posts
    33
    Why are u so bad on me? Pls don hurt others feelings.Pls type Politely. If you can help than help, if you don't wish to help pls don't type this kind of comments. I hope u understand. Pls atleast phrase it the way people will not be hurt by your words.

  15. #90
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    If you don't want to be called a cheater, don't be a cheater.

    Did you write the code, or did you copy it from somewhere?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. SRF02 ultrasonic sensor
    By quachtinh in forum C Programming
    Replies: 1
    Last Post: 11-13-2009, 06:51 AM
  2. How to get RSSI value, send to sensor, sensor receive package, repackage it?
    By techissue2008 in forum Networking/Device Communication
    Replies: 1
    Last Post: 03-04-2009, 10:13 AM
  3. Creating a array sensor
    By mikeprogram in forum C++ Programming
    Replies: 1
    Last Post: 12-01-2005, 05:44 PM
  4. OS sensor
    By Queatrix in forum Windows Programming
    Replies: 1
    Last Post: 07-11-2005, 07:00 PM