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.

gismo

Member Since 19 Oct 2013
Offline Last Active Aug 11 2016 12:20 AM
-----

Topics I've Started

Double.ToString() Not working correctly

12 September 2015 - 01:01 PM

I'm trying to show two decimal places and using the limited format specifiers it's not working. I'm trying this loop and I get the same result: 22.5034567...

 

 

            double myDouble = 22.503456785478;
            string[] formats = new string[]{"","f2","g2","n2", "d2", "0.00","N2"};
            
            for (int i  = 0;i<formats.Length;i++)
            {
                LCD.Clear();
                LCD.Write(formats[i] + ": " + myDouble.ToString()); //22.50 expected result
                Thread.Sleep(1000);
            }
Aside from writing a custom function to do this, is this a bug? Anyone else experience this? N2 netmf4.3

Netduino 2 4.3 Won't Attach To Debugger and Board Keeps Resetting

31 July 2015 - 10:18 PM

Looking for a device on transport 'USB'
Starting device deployment...
Iteration 0
Opening port \\?\USB#VID_22B1&PID_1000#000000000000#{09343630-a794-10ef-334f-82ea332c49f3}\Operations
Attaching debugger engine...
... debugger engine attached!
Querying device assemblies...
Found Assembly mscorlib 4.3.1.0
Found Assembly Microsoft.SPOT.Native 4.3.1.0
Found Assembly Microsoft.SPOT.Hardware 4.3.1.0
Found Assembly Microsoft.SPOT.Hardware.SerialPort 4.3.1.0
Found Assembly Microsoft.SPOT.IO 4.3.1.0
Found Assembly System.IO 4.3.1.0
Found Assembly Microsoft.SPOT.Hardware.PWM 4.3.1.0
Found Assembly Microsoft.SPOT.Hardware.Usb 4.3.1.0
Found Assembly SecretLabs.NETMF.Diagnostics 4.3.1.0
Found Assembly GoBus 1.5.0.0
Found Assembly SecretLabs.NETMF.Hardware.Netduino 4.3.1.0
Found Assembly SecretLabs.NETMF.IO 4.3.1.0
Found Assembly Microsoft.SPOT.Hardware.OneWire 4.3.1.0
Found Assembly System 4.3.1.0
Found Assembly SecretLabs.NETMF.Hardware 4.3.1.0
Found Assembly NetduinoApplication7 1.0.0.0
Found Assembly Microsoft.SPOT.Net 4.3.1.0
Adding pe file C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\System.pe to deployment bundle
Adding pe file C:\Program Files (x86)\Secret Labs\Netduino SDK\Assemblies\v4.3\le\secretlabs.netmf.hardware.pe to deployment bundle
Adding pe file C:\Users\Chad\Documents\Netduino\Projects\NetduinoApplication7\NetduinoApplication7\bin\Debug\le\NetduinoApplication7.pe to deployment bundle
Adding pe file C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\Microsoft.SPOT.Net.pe to deployment bundle
Attempting deployment...
Incrementally deploying assemblies to device
All assemblies on the device are up to date.  No assembly deployment was necessary.
Assemblies successfully deployed to device.
Restarting interpreter...
Attaching to device...
Waiting for device to initialize...

 

 

This is as far as I get when trying to debug. Then I hear the USB device sound toggle 3-4 times and then it looks like visual studio gives up. 

 

Things I've tried:

  • erasing the board with Netduino Update
  • re-updating firmware with Netduino Update
  • restarting Visual Studio
  • Rebooting Computer
  • trying different USB port on my computer

Any other ideas?

 


Hey Chris, I sent you a PM about a week ago...

15 July 2015 - 12:54 PM

Hey Chris, 

 

I sent you a PM about a week ago and I just wanted to make sure you've received it.

 

Please delete this post 

 

Thanks!


Does Netduino 4.3 Support Clock Stretching by I2C Slave Devices?

09 July 2015 - 02:25 AM

?

 

(I found this old thread http://forums.netdui...y-slave-device/but not real confirmation.)


Writing a better class to Manage EEPROM Chip - Guidance/Advice Wanted

30 June 2015 - 04:21 PM

Hey Everyone,

 

I've been racking my brain over writing a better class to manage an I2c EEProm chip. The chip works and all of the basic commands are working, but to really implement it in a way that's legible and useful has been tricky. I'm looking for an advice on how to compose a class that will make using the EEProm chip easier to work with.

 

 

A few inputs/requirements,

  • there are several data-points that needs to be stored on the chip..for example 20+ values.
  • Some are single bytes some are multiple bytes.
  • For each data-point in the class, there needs to be an EEProm Address, DisplayName,NumberOfBytes, RamValue, a type/category/flag..or possibly any other information about the data-point
  • We need to load most/all/or a filtered set of values into RAM when the device starts up..these are "device settings" this should be done with some type of loop as to not make 20 calls to get the value
  • Access to the RAM values should be as simple as 
    EEPROM.MyData1.Value
  • Similarly, updating or overwriting the value on the chip would be 
    EEPROM.MyData2.Update(newValue)
  • Since working with a display on the deivce, each data value would have a "DisplayName".. being able to loop through displayNames for purposes of showing them on a display would be useful. Some type of collection or array?
    EEPROM.MyData3.DisplayName
    
  • Based on looping through the data-points, we need to keep track of what the "current" value is in case we want to read or update.
  • Bonus features: If certain data-points can only contain certain values, can we impose those as choices?.. like "Yes/No" or "On/Off" 

I'm trying to create something simple and scalable..Adding additional data-points should be simple.

 

I've looked at type-safe enum patterns and a few other enum related code to try to accomplish this, but I'm looking for a little more guidance here. Maybe an enum with arrays linked to them?

 

Any advice would be appreciated!

 

 


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.