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.

Nicky

Member Since 06 Aug 2012
Offline Last Active May 10 2013 10:39 AM
-----

#41623 Multithreading

Posted by Nicky on 16 December 2012 - 02:14 PM

I have switched to single threaded programming on my Netduino Go, because when theres 4-5 concurrent threads running, one or two of them never gets CPU cycles after a minute of operation. Then if I reboot, it might work for two minutes, next time maybe five, next time maybe not at all. Everything shared is thread safe, minimal writing/reading to SD/ethernet due to buffers. And also... with 4-5 threads, it can take up to almost 14 seconds write 100 bytes to a SD card... the exact same code, when only 1 thread runs, it takes only a few milliseconds to write 1-2 kb. When that said, thats when my uploader should be working constantly, and saving every few second. But compared to single threaded mode, those few threads has an insane impact on performance... Sometimes a it can also take a few seconds, or maybe a minute, before the Netduio changes to a specific thread. They all have the same thread priority, but some threads get skipped when cycling!


#41422 Netduino Go Ethernet

Posted by Nicky on 12 December 2012 - 09:47 AM

As somebody who bought into the Netduino Go's vision based on what was posted by your company on this forum, I honestly feel like I've been mislead and bought into a technology that isn't ready for my needs. (I'm also waiting for a one-wire library and a shield base that doesn't require four sockets to use.) I don't mean to be an *ss, but honestly, lots of promises have been made to your customers that aren't being fulfilled. When can we expect real dates for these products/features?


I must agree. I've been working on my finals the last few months, based on Netduino Go because there would be a module ready.

Instead of working on the project it self, I've spent countless hours getting Ethernet running on the Go... both with and without mIP.


#40243 Replacing texst in strings

Posted by Nicky on 26 November 2012 - 05:38 PM

I usually make an extension:


public static class Extensions 
    {
        public static string Replace(this string str, string what, string with)
        {
            int index = -1;

            while ((index = str.IndexOf(what)) != -1)
            {
                if (index > 0)
                {
                    str = str.Substring(0, index) + with + str.Substring(index + what.Length);
                }
            }

            return str;
        }
    }

And then uses it by:

string str = "something";
str.Replace("\r", "");



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.