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.

blubblub's Content

There have been 10 items by blubblub (Search limited from 26-April 23)


By content type

See this member's

Sort by                Order  

#14906 Is there a moisture sensor to put in the ground?

Posted by blubblub on 01 July 2011 - 04:03 AM in General Discussion

JonnyBoats, Thanks for the insight. So I guess reading the moisture content of something physical is slightly more of a challenge than originally thought. And that's because i can't find a sensor that will do that for me... But really isn't it the same idea as a pentiometer? One prong receiving electricity, another for it to exit, and one in the middle to read what's moving across the other two?



#14892 Is there a moisture sensor to put in the ground?

Posted by blubblub on 30 June 2011 - 02:05 AM in General Discussion

Hi, I'd like to take readings of the ground's moisture content. What type of sensor would work best for this application? Does the sensor need to be buried or is there a better way to go about this? Thanks in advance! -blubblub



#8230 Serial Interface with 5V?

Posted by blubblub on 24 January 2011 - 01:41 AM in General Discussion

Fabien, Thanks for the feedback.



#8196 Serial Interface with 5V?

Posted by blubblub on 23 January 2011 - 06:48 PM in General Discussion

Hello,
So I think that I’m a little over my head here. I bought the Sparkfun RGB LED Matrix controller. It requires a 5V power supply which can be provided from the netduino plus but the SPI interface description states that it requires 5V on it CS pin for “high”. The max ouput on the netduino i/o pins is 3.3V right? What’s the best way to interface with this controller? Did I mention I’m a newb :)
Thanks in advance!



#6478 Xml Reader

Posted by blubblub on 24 December 2010 - 04:44 PM in Netduino Plus 2 (and Netduino Plus 1)

Can anyone show a simple working example of the XmlReader reading an attribute from an element? Otherwise I’ll move on to using strings instead. I don’t mind that the features aren’t available. The struggle is the limited resources in finding out if they are. Does a guiding rule exist when working with Netduinos (or other Micro Controllers) that could help determine if specific Assemblies, namespaces, classes and functions will not functioning as expected? Coming from a Web Dev. background I’m finding that I’m wrestling with the limited features of the micro framework. I like the refined and fresh approach of tackling the issues but I feel like I’m finding dead ends at every turn. I’m sure it’s just the learning curve but any help is appreciated. That’s why I like the forums. So, if anyone could answer the two questions above, Thanks in advance!



#6460 Xml Reader

Posted by blubblub on 24 December 2010 - 06:40 AM in Netduino Plus 2 (and Netduino Plus 1)

Thanks for the good feedback. Though I still don't seem to be able to get this to work for me. With the code below I'm receiving this error when I hit the XmlReader. Any ideas?

The thread '<No Name>' (0x2) has exited with code 0 (0x0).
    #### Exception System.NotSupportedException - CLR_E_NOT_SUPPORTED (1) ####
    #### Message: 
    #### System.Xml.XmlReader::Create [IP: 00c7] ####
    #### System.Xml.XmlReader::Create [IP: 0005] ####
    #### NetduinoApplication1.StorageData::XmlFromStorage [IP: 0020] ####
    #### NetduinoApplication1.Program::Main [IP: 0009] ####
A first chance exception of type 'System.NotSupportedException' occurred in System.Xml.dll

            using (FileStream fs = new FileStream("\\SD\\test.xml", FileMode.Open, FileAccess.Read, FileShare.None, 512))
            {
                using (StreamReader sr = new StreamReader(fs))
                {

                    Stream s = sr.BaseStream;
                    XmlReader r = XmlReader.Create(s);

                    while (r.Read() && !r.EOF)
                    {



#6373 Xml Reader

Posted by blubblub on 22 December 2010 - 02:16 PM in Netduino Plus 2 (and Netduino Plus 1)

The system.xml class does not appear to have any options that can return attributes of an xml element. If no options exist, what's the alternative?



#6356 Xml Reader

Posted by blubblub on 22 December 2010 - 04:08 AM in Netduino Plus 2 (and Netduino Plus 1)

Hello, I'm trying to find a way to read/grab attributes from xml. Is the XmlReader class from the System.Xml namespace available? If not, does an alternative exist?



#6236 CLR_E_OUT_OF_MEMORY

Posted by blubblub on 19 December 2010 - 05:54 AM in Netduino Plus 2 (and Netduino Plus 1)

Oz, I tried "the quick fix" but received an IndexOutOfRangeException. In the end what Chris said about chunking the data works for this project. After the code below creates string chunks I'll trim the ends and make them xml. I should be able to grab the attributes I'm looking for from each element. The JSON idea makes sense but I'm working on xml files purposed for something else. I'm open to suggestions. I want to learn! That was a great first lesson. Thanks again!
FileStream fs = new FileStream("\\SD\\test.xml", FileMode.Open, FileAccess.Read);

            int nBits = 512;
            byte[] ByteArray = new byte[nBits];
            int nBytesRead = fs.Read(ByteArray, 0, nBits);
            string strLine = "";
            char[] CharArray = Encoding.UTF8.GetChars(ByteArray);
            foreach (char i in CharArray)
            {
                strLine = strLine + i;
            }

            Debug.Print(strLine);



#6219 CLR_E_OUT_OF_MEMORY

Posted by blubblub on 18 December 2010 - 10:47 PM in Netduino Plus 2 (and Netduino Plus 1)

Hello,
I'm trying to load an xml file residing on the SD Card. The original file is 82kb in size and will not load. But if I reduce the file's size to 1kb it works. The error "CLR_E_OUT_OF_MEMORY" occurs when attempting to load the 82kb file. Does a limitation exist that I'm not aware of? Thanks in advance!!! My code below:

using (StreamReader r = new StreamReader("\\SD\\test.xml"))
                {
                    if (r.BaseStream.Length > 0)
                    {
                        do
                        {
                            
                            string line = r.ReadToEnd();
                            Debug.Print(line);
                            r.Close();


                        } while (!r.EndOfStream);
                    }
       
                }





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.