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.

ZakieM's Content

There have been 26 items by ZakieM (Search limited from 29-March 23)


By content type

See this member's


Sort by                Order  

#21185 Compatible Shields and Accessories

Posted by ZakieM on 30 November 2011 - 08:50 PM in Netduino 2 (and Netduino 1)

Gravitech 7 Segment Shield (http://forums.netdui...h__1#entry11617)
That was my first Netduino work (well after the LED blink sample), and I simply ported the code from the Arduino C/C++ to C#



#16004 Netduino Plus Firmware v4.2.0 BETA 1

Posted by ZakieM on 28 July 2011 - 03:58 PM in Beta Firmware and Drivers

Any plans to include OneWire too?



#27866 PC rebooting on NetduinoPlus Disconnect

Posted by ZakieM on 22 April 2012 - 05:01 AM in Beta Firmware and Drivers

For me uninstalling Secretlabs SDK and .NETMF and the re-installing 4.1 helped (and it uninstalled GHI too). The 4.2 was somewhat useless for my project as I could not fit the program into memory of the N+.



#27051 PC rebooting on NetduinoPlus Disconnect

Posted by ZakieM on 12 April 2012 - 08:31 AM in Beta Firmware and Drivers

After I installed the 4.2 drivers, I got my PC rebooting on disconnecting NetduinoPlus but not always. The phenomena also included PC reset on pressing the NetduinoPlus on-board reset pin (the two developed too strong attachment :rolleyes:)
I now downgraded the Netduino itself to 4.1.06 again (not enough code space for my program in 4,2).



PC Information:
Windows 7 64bit (fully updates from MS)
VS 2010 Professional v 10.0.40219.1 SP1 Rel

NetduinoPlus Driver information:
(right click on the NetduinoPlus device in device manager)
6.1.7600.16385 by WinDDK



.



#16154 USB Oscilloscopes?

Posted by ZakieM on 01 August 2011 - 07:09 PM in General Discussion

I got one DSO Nano and pretty happy with it. Don't expect a whole lot from it, but for my amateur work, this is pretty good thing, plus it is very portable!



#14641 Beginner advice netduino vs arduino

Posted by ZakieM on 23 June 2011 - 08:11 PM in Netduino 2 (and Netduino 1)

I found the following link to be very useful for samples and "libraries"

http://code.tinyclr....Projects&page=1



#16006 USB Power and 9volt battery life

Posted by ZakieM on 28 July 2011 - 04:12 PM in Netduino Plus 2 (and Netduino Plus 1)

Running into the need of using a device without near-by power source I played with this a bit. There is an option to put the device to sleep (assuming you don't need it to run all the time). This works in some Netduino like devices but NOT on the Netduino itself. I got C# for putting the device to sleep mode, but it did not work. I confirmed that with Microsoft .NETMF developers too. GHI Electronics has support for putting the CPU to sleep and perhaps others do too. Though I got some of GHI boards as a result, I did not verify the sleep functionality.
With my project, I eventually gave up and used Arduino Fio with LiPo battery and the device sleeps for 2seconds, wakes up check status and if nothing to do, goes back to sleep. By that I extended the lifetime of a 2000mA battery by 10 folds at least. With the Fio being extremely battery friendly I completed the project and battery last there for 4 months already without recharging. Still, I felt bad for not doing it with the Netduino (defeat the purpose I called it).



#24053 HMC5883L Magnetometer Netduino Code

Posted by ZakieM on 10 February 2012 - 09:55 AM in Project Showcase

When it comes to IMU units, you might need more than one device on the I2C bus, and frankly NETMF is too tedious for handling multiple devices.
So I borrowed the code from here plus a lot of code from http://LoveElectronics.co.uk to integrate 3 I2C devices on the same bus:

HMC5883L Magnetometer
ADXL345 Accelerometer
ITG3200 Gyro
And glued those together to display results on ST7565 LCD display (code from thttp://inyclr.com).

I hope that what I found simpler to use in order to access multiple devices on the bus will be useful for others too.

Attached Files




#25134 HMC5883L Magnetometer Netduino Code

Posted by ZakieM on 06 March 2012 - 07:36 AM in Project Showcase

I actually use 3 different boards, Gyro is ITG-3200, Accelerometer is ADX345 and Compass is HMC5883L. I found all three on eBay for substantially smaller price than the typical Arduino/Netduino online stores. Yes, I did add 2x Pullup resistors on the I2C bus. One of the issues I found even with the posted code was tilt compensation for the Compass was not working too good. It manged pitch well, but roll was changing the heading too much. Last night while digging more, I found some good PDF published by Honeywell on magnetic sensors and a tilt compensation algorithm that seems to work perfectly (on my breadboard still). If you are using the ST7565 display too, I added graphical functions to it and drastically improved its performance now too, All of that in the attached

Attached Files




#27712 N+ showing Weather Underground information on VGA

Posted by ZakieM on 20 April 2012 - 12:45 PM in Project Showcase

Using N+ to get weather forecast information from Weather Underground site

Features
  • Fully automatically identifies location in the globe and time
  • Graphically displays current and forecast weather information
  • Automatically synchronizes time and daylight savings from the internet (using NTP protocol)
  • Shows sunrise, sunset and moon phase information
  • Does not require any PC to be involved
  • Easy to connect and assembly, only Ethernet cable and power supply
  • Supports DHCP for network connection
  • Supports both VGA screens and small 3.2" screens

Code and instructions (very easy) in here

Attached Thumbnails

  • MainScreen.jpg



#27718 N+ showing Weather Underground information on VGA

Posted by ZakieM on 20 April 2012 - 01:37 PM in Project Showcase

The N+ only stream out data, that is it tells the uVGA (or other 4D screen) current temp is X and humidity Y and moon is Z etc.
The N+ also tells the uVGA the time and date.

The uVGA itself then is running a program I wrote (it is programmable using 4GL language) that split the screen to tiles, changes font sizes, colors and what have you. Icons and bitmaps are stored on SD card of the uVGA. That code and content of the SD is part of the ZIP file.

The N+ updates the uVGA only once in few minutes. In the mean time an internal timer on the uVGA is interrupting once a second so that you get a clock with seconds displayed.

Both N+ and uVGA have very inaccurate timing, but the N+ is slightly better. This is why the NTP is polled once in 6 hours and fixes the drifts of the N+ time, and then the N+ is also updating the uVGA.

The uVGA has two firmwares, the one I use that requires you to program in 4GL and another one that lets you send graphical commands from UART. Switching between the two is simple. Take a look at their site.



#28277 N+ showing Weather Underground information on VGA

Posted by ZakieM on 28 April 2012 - 10:41 PM in Project Showcase

Ask Geo service has updated their service and new posted code here incorporates the changes required.

Attached Files




#27714 N+ showing Weather Underground information on VGA

Posted by ZakieM on 20 April 2012 - 01:03 PM in Project Showcase

Thanks Hanzibal! Regarding #1, yes I do determine location based on external IP of the network the N+ is connected to. Good enough for weather information and likely to work at any home. Proxies will cause some problems. Regarding #2, I am not sure exactly as the screen I used does not report the complete VGA settings. It is a 800x480 in resolution but not sure how many Hz for the refresh. If your question is about the speed at which the display is updated, it is very good. The reason is the mentioned adapter has a "GPU" on it from 4D Systems, and all the graphical commands and layout of screen is done on that "GPU", and not by the N+.



#30432 Auto detection NTP code

Posted by ZakieM on 08 June 2012 - 07:19 PM in General Discussion

Thanks for noting. Done



#26810 Moving to SDK 4.2 question

Posted by ZakieM on 09 April 2012 - 09:49 PM in Netduino Plus 2 (and Netduino Plus 1)

To revert back to 4.1, do I need to revert the TinyBooterDecompressor too or can I do it with the one loaded in the process of upgrading to 4.2? If need to revert the booter, where is it?



#25927 Auto detection NTP code

Posted by ZakieM on 24 March 2012 - 11:43 AM in General Discussion

In this code an implementation of NTP client and auto-detection classes for actual
timezone. To avoid too large assemblies, I did not use any XML or JSON parsing
classes. If your application is using XML or JSON parsing, the use of those here
could reduce code size.

The code refreshes local time with NTP server in a configurable number of hours. I noticed that on my device with 10 hours the clock gets drifted in couple of seconds. Use 5-6 hours for refresh. This is the main reason I wrote this code... I did not implement a refresh when DST turns on or off. If anyone adds that, please share.

How it Works:


By quering geobytes.com and askGeo.com I am finding the actual time-zone of the device:
Through geobytes.com I am finding my location in the world
Through askGeo.com I am finding the timezone data of this location


Limitations:


This auto-detection will work if the device is connected to the internet through
standard NAT configuration, but with remote proxies the auto-detection will be
wrong as it will detect the timezone of the proxy itself. For most applications
however it is good enough.

Don't expect a GPS accuracy for your location. It will probably get you the
name of city/town where your ISP is, and not your actual location, still for
timezone purposes this good enough.

Please read http://www.askgeo.com Terms of Use and legal disclaimer


Special NOTE:


In this code an API Key that is registered to the author of this code.
>>>> Please modify it to your registered key <<<<
Search below for <<<< to location of where you need to put your key


You may use the code, modify or include in any project you have, posted in the hope it will be useful.
Please read http://www.askgeo.com Terms of Use and legal disclaimer
Please read http://www.geobytes.com Terms and Conditions

/* =====================================================================================
 * NTP Protocol synchronization code
 * In this code an implementation of NTP client and auto-detection classes for actual
 * timezone. To avoid too large assemblies, I did not use any XML or JSON parsing
 * classes. If your application is using XML or JSON parsing, the use of those here
 * could reduce code size.
 * 
 * How it Works:
 *      By quering geobytes.com and askGeo.com I am finding the actual time-zone of the
 *      device:
 *          Through geobytes.com I am finding my location in the world
 *          Through askGeo.com I am finding the timezone data of this location
 * Limitations:
 *      This auto-detection will work if the device is connected to the internet through
 *      standard NAT configuration, but with remote proxies the auto-detection will be
 *      wrong as it will detect the timezone of the proxy itself. For most applications
 *      however it is good enough.
 *       	
 *      Don't expect a GPS accuracy for your location. It will probably get you the
 *      name of city/town where your ISP is, and not your actual location, still for
 *      timezone purposes this good enough.
 *      
 *      Please read http://www.askgeo.com Terms of Use and legal disclaimer
 *      
 * Special NOTE:
 *      In this code an API Key that is registered to the author of this code.
 *      >>>> Please modify it to your registered key <<<<
 *      Search below for <<<< to location of where you need to put your key
 * =====================================================================================
 * By: Zakie Mashiah
 * You may use the code, modify or include in any project you have.
 * Please read http://www.askgeo.com Terms of Use and legal disclaimer
 * Please read http://www.geobytes.com Terms and Conditions
 * =====================================================================================
 */
using System;
using System.Threading;
using System.IO;
using System.Text;
using System.Net;
using System.Net.Sockets;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using Microsoft.SPOT.Net;
using Microsoft.SPOT.Time;

using SecretLabs.NETMF;
using SecretLabs.NETMF.Hardware;

namespace NTPThread
{
    public class GeoLoactionByIP
    {
        public string country;
        public string region;
        public string city;
        public string latitude;
        public string longitude;
        public string timezone;
        public int timeZoneMinutesGMT; // How many minutes from GMT
        public string externalIPAddress;

        private string queryString 
        {
            get { return "http://www.geobytes.com/IpLocator.htm?GetLocation&Template=XML.txt"; }
        }

        /// 
        /// Converts the internal string member of timezone to internal member of minutes from GMT
        /// 
        private void _parseTimeZoneString()
        {
            int sign;
            int hour;
            int minute;

            sign = timezone[0] == '+' ? 1 : -1;
            hour = (timezone[1] - '0') * 10 + (timezone[2] - '0');
            minute = (timezone[4] - '0') * 10 + (timezone[5] - '0');

            timeZoneMinutesGMT = sign * ((hour * 60) + minute);
        }

        /// 
        /// Read an attribute in the XML string until the end of the attribute
        /// 
        /// String with the reply XML and starting with the value
        /// The sub-string until end of parameter denotion of XML
        private string _readAttribute(string parser, bool isString = true)
        {
            int start, end;
            string rv = null;
            string de = (isString) ? "\"" : ",";      // Data ends at
            string ds = (isString) ? "\":\"" : "\":"; // Data starts at

            start = parser.IndexOf(ds);
            if (start > 0)
            {
                start += ds.Length;
                end = parser.IndexOf(de, start);
                if (end > 0)
                {
                    rv = parser.Substring(start, end - start);
                }
            }
            return rv;
        }

        /// 
        /// Reads the stream of reply from the geobytes and parses it into the variables
        /// 
        /// the stream of the reply
        private void _readStream(Stream s)
        {
            System.Threading.Thread.Sleep(1000); // Wait a while
            StreamReader sr = new StreamReader(s);
            string parser = sr.ReadToEnd();

            int location = parser.IndexOf("country\":\"");
            if (location > 0)
            {
                parser = parser.Substring(location);
                this.country = _readAttribute(parser);
                
                location = parser.IndexOf("region\":\"");
                if (location > 0)
                {
                    parser = parser.Substring(location);
                    this.region = _readAttribute(parser);
                    
                    location = parser.IndexOf("city\":\"");
                    if (location > 0)
                    {
                        parser = parser.Substring(location);
                        this.city = _readAttribute(parser);

                        location = parser.IndexOf("latitude\":");
                        if (location > 0)
                        {
                            parser = parser.Substring(location);
                            this.latitude = _readAttribute(parser, false);
                            
                            location = parser.IndexOf("longitude\":");
                            if (location > 0)
                            {
                                parser = parser.Substring(location);
                                this.longitude = _readAttribute(parser, false);

                                location = parser.IndexOf("timezone\":\"");
                                if (location > 0)
                                {
                                    parser = parser.Substring(location);
                                    this.timezone = _readAttribute(parser);
                                    location = parser.IndexOf("ipaddress\":");
                                    if (location > 0)
                                    {
                                        parser = parser.Substring(location);
                                        this.externalIPAddress = _readAttribute(parser);

                                        // Now parse the timezone string to minutes
                                        _parseTimeZoneString();
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        
        /// 
        /// Queries the Geobytes service for location of the IP address.
        /// 
        /// 
        public void queryLocation(string ip = null)
        {
            string q = (ip == null) ? queryString : queryString + ip;
            HttpWebRequest request = HttpWebRequest.Create(q) as HttpWebRequest;
            WebResponse resp = null;

            try
            {
                resp = request.GetResponse();
            }
            catch (Exception e)
            {
                Debug.Print("ERROR: Exception in HttpWebRequest.GetResponse() for geobytes.com" + e.ToString());
            }

            if (resp != null)
            {
                Stream respStream = resp.GetResponseStream();
                respStream.ReadTimeout = 5000;
                _readStream(respStream);
                resp.Close();
            }
            request.Dispose();
        }

        public override string ToString()
        {
            return "Country=\t" + country +
                "\n\tRegion=\t" + region +
                "\n\tCity=\t" + city +
                "\n\tLatitude=\t" + latitude +
                "\n\tLongitude=\t" + longitude +
                "\n\tTimezone=\t" + timezone +
                "\n\tMinutesFromGMT=\t" + timeZoneMinutesGMT +
                "\n\tExternalIP=\t" + externalIPAddress;
        }
    }





    public class AskGeoService
    {
        public long currentOffserMS;

        private const string accountID = "";             	// <<<< Put up your account ID, PLEASE!
        private const string apiKey = ""; // <<<< Put here your API key, PLEASE!
        private string queryString(string latitude, string longitude)
        {
            return "http://www.askgeo.com/api/" + accountID + "/" + apiKey + "/timezone.json?points=" + latitude + "%2C" + longitude;
        }


        public void queryLocation(string latitude, string longitude)
        {
            string q = queryString(latitude, longitude);

            HttpWebRequest request = HttpWebRequest.Create(q) as HttpWebRequest;
            WebResponse resp = null;

            try
            {
                resp = request.GetResponse();
            }
            catch (Exception e)
            {
                Debug.Print("ERROR: Exception in HttpWebRequest.GetResponse() for askgeo.com" + e.ToString());
            }

            if (resp != null)
            {
                Stream respStream = resp.GetResponseStream();
                respStream.ReadTimeout = 5000;

                System.Threading.Thread.Sleep(1000); // Wait a while
                StreamReader sr = new StreamReader(respStream);
                string parser = sr.ReadToEnd();
                int location;

                location = parser.IndexOf("currentOffsetMs\":");
                if (location > 0)
                {
                    parser = parser.Substring(location);
                    int start = parser.IndexOf(':') + 1;
                    location = parser.IndexOf(',');
                    string currentOffsetMsString = parser.Substring(start, location - start);

                    currentOffserMS = Convert.ToInt32(currentOffsetMsString);
                }
                resp.Close();
            }
            request.Dispose();
        }
    }





    public class NetworkTimeProtocolThread
    {
        #region Variables
        private static int sleepTime = 60 * 10; // Every 10 hours
        private static string ntpName = "time-a.nist.gov";
        private static int minutesFromGMT;
        #endregion

        

        #region PrivateFunctions
        private static void SleepMinutes()
        {
            int times;

            times = sleepTime == 0 ? 1 : sleepTime;
            for (int i = 0; i < times; i++)
            {
                Debug.Print(DateTime.Now.ToString() + " NTP Thread:: " + i.ToString() + " of " + times.ToString());
                Thread.Sleep(60 * 1000); // Minute
            }
        }

        private static void SetSystemTime(DateTime dt)
        {
            // Simulate timezone and DST of 3 hours (life is good in Tel-Aviv :-)
            TimeSpan timezoneOffset = TimeSpan.FromTicks(minutesFromGMT * TimeSpan.TicksPerMinute);
            dt += timezoneOffset;
            Debug.Print("\tSetting time to:\t" + dt.ToString());
            Utility.SetLocalTime(dt);
            Debug.Print("\tSystem Time is :\t" + DateTime.Now.ToString());
        }
        #endregion

        #region PublicFunctions
        public static void SetRefreshRate(int hoursForRefresh) { sleepTime = hoursForRefresh * 60; }
        public static void SetNTPHost(string host) { ntpName = host; }
        public static int GetTimeZoneOffset() { return minutesFromGMT; }
        public static void SetTimeZoneOffset(int minutes_from_GMT) { minutesFromGMT = minutes_from_GMT; }

        public static DateTime GetNetworkTime()
        {
            DateTime dt = new DateTime(1900, 1, 1, 1, 1, 1);
            IPHostEntry ntpServer = Dns.GetHostEntry(ntpName);
            if (ntpServer == null)
            {
                Debug.Print("ERROR: Can't find DNS entry for " + ntpName);
                return dt;
            }
            if (ntpServer.AddressList == null)
            {
                Debug.Print("ERROR: No addresses found for NTP server " + ntpName);
                return dt;
            }

            IPEndPoint ep = new IPEndPoint(Dns.GetHostEntry(ntpName).AddressList[0], 123);

            Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
            s.Connect(ep);

            byte[] ntpData = new byte[48]; // RFC 2030
            ntpData[0] = 0x1B;
            for (int i = 1; i < 48; i++)
                ntpData[i] = 0;

            s.Send(ntpData);
            s.Receive(ntpData);

            byte offsetTransmitTime = 40;
            ulong intpart = 0;
            ulong fractpart = 0;
            for (int i = 0; i <= 3; i++)
                intpart = 256 * intpart + ntpData[offsetTransmitTime + i];

            for (int i = 4; i <= 7; i++)
                fractpart = 256 * fractpart + ntpData[offsetTransmitTime + i];

            ulong milliseconds = (intpart * 1000 + (fractpart * 1000) / 0x100000000L);

            s.Close();

            TimeSpan timeSpan = TimeSpan.FromTicks((long)milliseconds * TimeSpan.TicksPerMillisecond);
            DateTime dateTime = new DateTime(1900, 1, 1);
            dateTime += timeSpan;


            TimeSpan offsetAmount = TimeZone.CurrentTimeZone.GetUtcOffset(dateTime);
            DateTime networkDateTime = (dateTime + offsetAmount);
            Debug.Print("   NetworkDateTime: " + networkDateTime.ToString());

            return networkDateTime;
        }


        #region NTPThreadRunner
        public static void Run()
        {
            Debug.Print("Network Time Protocol Thread starting...\n\tServer\t" + ntpName + "\n\tevery\t" + sleepTime.ToString() + " hours");
            while (true)
            {
                Debug.Print("NTP Thread:: Checking NTP server time. Time before: " + DateTime.Now.ToString());
                DateTime dt = GetNetworkTime();
                SetSystemTime(dt);
                SleepMinutes();
            }
        }
        #endregion
        #endregion
    } // End of NTP Thread class
}


Test Code:
using System;
using System.IO;
using System.Text;
using System.Threading;
using System.Net;
using System.Net.Sockets;
using System.Collections;

using Microsoft.SPOT;
using Microsoft.SPOT.IO;
using Microsoft.SPOT.Hardware;


using SecretLabs.NETMF;
using SecretLabs.NETMF.Hardware.NetduinoPlus;

using NTPThread;

/// This program demonstrates how to use the .NET Micro Framework HTTP classes 
/// to create a simple HTTP client that retrieves pages from several different 
/// websites, including secure sites.
namespace NTPTestProgram
{

    public static class NTPTestProgram
    {
        #region Variables
        static DateTime startTime;
        #endregion // Variables

        #region Main
        /// 
        /// Retrieves weather current and forecast information from Google Weather and display
        /// it on the LCD with time ticking clock
        /// 
        public static void Main()
        {
            DateTime dt;
            int delay;

            // Initialization
            InitNetwork();
            InitLocation();
            InitRealTimeClock();


            // Loop (forever)
            for (int minute = 0; ; minute += 1000)
            {
                if (minute > (60 * 1000)) 
                    minute = 0;
                dt = DateTime.Now;
                ShowTime();
                TimeSpan ts = DateTime.Now - dt;
                delay = 1000 - ts.Milliseconds;
                if (delay > 0)
                    Thread.Sleep(delay);
                else
                    Debug.Print("Total processing time was: " + ts.Milliseconds.ToString());
            }
        }
        #endregion

        #region InitFunctions
        public static void InitNetwork() { } // Would need to populate if using a Ethernet Shield

        public static void InitRealTimeClock()
        {

            NetworkTimeProtocolThread.SetRefreshRate(5);
            new Thread(NetworkTimeProtocolThread.Run).Start();
            Thread.Sleep(1000); // Wait a second for NTP to push system time

            startTime = DateTime.Now;

            Debug.Print("Starting at: \t[" + startTime.ToString() + "]");
        }

        public static void InitLocation()
        {
            GeoLoactionByIP myLocation = new GeoLoactionByIP();
            AskGeoService askGeo = new AskGeoService();

            myLocation.queryLocation();
            Debug.Print("Location:\n\t" + myLocation.ToString() );

            askGeo.queryLocation(myLocation.latitude, myLocation.longitude);
            
            int minutes = (int)(askGeo.currentOffserMS / 1000 / 60);
            Debug.Print("\tCurrent timezone offset=" +  minutes + " minutes");
            NetworkTimeProtocolThread.SetTimeZoneOffset(minutes);
        }

        #endregion




        #region UtilityFunctions
        private static string DecimalTwoPos(int d)
        {
            if (d < 10)
                return "0" + d.ToString();
            else
                return d.ToString();
        }
        #endregion

        #region DisplayFunctions
        private static void ShowTime()
        {
            DateTime dt = DateTime.Now;
            string s = DecimalTwoPos(dt.Hour) + ":" + DecimalTwoPos(dt.Minute)+ ":" + DecimalTwoPos(dt.Second);
            Debug.Print(s);

        }
        #endregion

    }
}

Attached Files




#26729 Moving to SDK 4.2 question

Posted by ZakieM on 08 April 2012 - 11:38 AM in Netduino Plus 2 (and Netduino Plus 1)

I am trying to move my NetduinoPlus to v4.2 and was following the Wiki on how to do this.
In the article Installing the TinyBooterDecompressor step by step (Netduino and Netduino Plus) I got to the surprising step of flashing the TinyBooter... but could not find where to get it from. In the SecretLabs directory I only have Assemblies and drivers.

Any help will be appreciated.



#26744 Moving to SDK 4.2 question

Posted by ZakieM on 08 April 2012 - 08:15 PM in Netduino Plus 2 (and Netduino Plus 1)

Thanks for the prompt reply. Things seems to work now. One comment, if I may suggest, to include referenced downloads in the Wiki page.



#26749 Assemblies not successfully deployed to device

Posted by ZakieM on 08 April 2012 - 09:16 PM in General Discussion

Thanks Chris.Ouch... I thought there will be 10K more :-( It is a simple program that parses information from Web servers (XML), but to save space and memory I'm doing it the tedious way with manually parsing stream. Got to bare minimum of functionality and it doesn't seem like it will fit to memory eventually. With the 4.1 I was running between 19K to 9K free, which from time time causes out-of-memory exception if was not calling GC myself after string operations.



#26745 Assemblies not successfully deployed to device

Posted by ZakieM on 08 April 2012 - 08:31 PM in General Discussion

Just moved to 4.2 RTM (QFE1), on a Netduino Plus
I checked couple of programs, but found issues. Projects with any networking seems to work fine. However, projects involving networking do not get deployed.
The error I am getting is quite useless:


Incrementally deploying assemblies to device
Deploying assemblies for a total size of 51348 bytes
Assemblies not successfully deployed to device.
Deployment to the device was not successful.


And the error list suggest I should check my hardware.

Any pointer for identifying the problem will be appreciated.



#15940 Where do I get the address from?

Posted by ZakieM on 26 July 2011 - 09:57 PM in Netduino Plus 2 (and Netduino Plus 1)

I am using the code from http://www.schuurmans.cc/tag/webserver on my new Netduino Plus. I am getting IP address of 192.168.5.100 and in the debugger I see that DHCP is enabled (the code from WebServer.cs and ListInterfaces function is showing iface with that IP and IsDhcpEnabled as 1.
My network is 192.168.2.XX and I know my router gives good IP addresses to other devices connected to same Ethernet cable...

Since the DGW is 192.168.5.1 too, I suspect this is some sort of default somewhere... but could not find it.

Can someone direct me to where the problem might be?



#15955 Where do I get the address from?

Posted by ZakieM on 27 July 2011 - 06:52 AM in Netduino Plus 2 (and Netduino Plus 1)

Thanks Chris for your prompt reply and help. Eventually issue resolved.

In MFDeploy main window chose USB instead of Serial, then went to Target menu as you said above, DHCP was on, turned it off set static values that made sense and it did not work. After setting DHCP on again, it started working. I guess something was in zombie mode before.


Now on to do the project: Electricity cabinet monitoring.



#16701 Send data wirelessly using RF modules

Posted by ZakieM on 14 August 2011 - 05:31 AM in General Discussion

Just pick the XBee modules. Plenty of samples on Netduino and Arduino for using those. That is good if you want two-way communication, that is each device can both send and recieve from the other device. For one way (simplex) communication where one of the devices only sends data and the other only recieves, there are cheaper alternatives for UART style communication.



#16206 Accuracy of time

Posted by ZakieM on 02 August 2011 - 09:36 PM in Netduino Plus 2 (and Netduino Plus 1)

Thanks Mario. So basically we see about 70% more in ppm that we should, which means there are firmware issues. With the number of times I need to pull the USB out and in again because deploying or start debugging gets stuck, it is of no surprise that there "could be" firmware issues. I will test this with FEZ Panda II that I got at home to see if works better or not.



#16153 Accuracy of time

Posted by ZakieM on 01 August 2011 - 06:58 PM in Netduino Plus 2 (and Netduino Plus 1)

I was trying to see how accuracte the time is on the Netduino Plus, so took code of NTP and made the Netduino be updated from the network, then do almost nothing but Thread.Sleep and waited for 10 hours to check again DateTime.Now compared to the NTP and found the difference to be 6 seconds behind. This means that over a day we should expect 14-15 seconds lag. The test was made in ~25C environment. Is this reasonable? Is the best way to compensate on that is probe the NTP server once in few hours instead?




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.