Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.

mwesigebrian's Content

There have been 3 items by mwesigebrian (Search limited from 30-March 23)


By content type

See this member's

Sort by                Order  

#48915 convert byte to string

Posted by mwesigebrian on 01 May 2013 - 11:18 AM in Netduino 2 (and Netduino 1)

thanks, how would you suggest i handle the junk on the line, because an exception is thrown each time the gsm cellular module receives a call




#48889 convert byte to string

Posted by mwesigebrian on 30 April 2013 - 06:55 PM in Netduino 2 (and Netduino 1)

so a i have a gsm cellular sheild connected to a netduino com1 and i want to read data from com1, but i have failed to convert the bytes output to string, the method:

string result =System.Text.Encoding.UTF8.GetSTring(bytes);

doesnt seem to exist in the microframe work library so i tried to use this:

 

 
        static void port_DataReceived(object sender, SerialDataReceivedEventArgs e) {
 
 
            byte[] bytes = new byte[1];
         
           while (port.BytesToRead > 0)
            {
                port.Read(bytes, 0 , bytes.Length);
                //port.Write(bytes, 0, bytes.Length);
                         
            }
 
           
 
            try
            {
            char[] cc = Encoding.UTF8.GetChars(bytes, 0, bytes.Length);
 
            string s = new string(cc);
            Debug.Print(s);
            Debug.Print("then");
            }
            catch(Exception ex) {
 
              Debug.Print(ex.Message);
            Debug.Print("n");
            Debug.Print(ex.StackTrace);
            }
        }
       
 
but it throws  a system.exception  and i dont why. 
HELP PLIZ



#45424 Netduino and ADH8066 GSM module

Posted by mwesigebrian on 13 February 2013 - 11:09 AM in General Discussion

Hello, 

I need help with a project that involves the use of a netduino 2, an SM5100B gsm/gprs module, a keypad and a solenoid valve that is normally closed. I am very new to this....the idea is for the netduino to be able to read a particular unique code phone number and amount of money sent via mobile money from the simcard on the gsm module and open the valve for a specified amount of time and then close....I am told i need to incorporate AT commands in the C# source code to get this working. I need help with the code





home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.