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.

Tobias Vandenbempt

Member Since 29 May 2012
Offline Last Active Sep 26 2014 06:48 PM
-----

Topics I've Started

RebootDevice(false) doesn't reenter Main

10 May 2014 - 11:16 AM

Hi guys, 

 

I tried to use the following statement on my Netduino Plus 2 today and it didn't enter the Program Main() function after restarting. You happen to know why this is? 

            Microsoft.SPOT.Hardware.PowerState.RebootDevice(false);

The False parameter is described as 'Soft', what does this imply? 

 

As usual, thanks in advance!

Tobias


NP2 & Sparkfun BMP085 (I2C)

22 March 2014 - 08:53 AM

Hi everyone, 

 

(I asked for help in the previous topic, but no reaction, probably because of the solved state of that topic? So I place it in a new one!)

 

I tried to take a shot at this too. I've got a Netduino Plus 2 too(   :)), running NETMF4.2.
Borrowing your code I tried it like this:

   public static void NetduinoForumsMethod2()
        {
            IC_BMP085 press;
            press = new IC_BMP085(0x77);
            while (true)
            {


                var logString = "pressure: " + press.pressure + " " + "altitude: " + press.altitude.ToString("F1") + " " + "free mem: " + Debug.GC(false); Debug.Print(DateTime.Now + ": " + logString);
                Thread.Sleep(3000);
            }


        }

In the code class provided, it now crashes on 2 places.
First in the CalculateTemperature method on following line:

              
  x2 = mc * 2048 / (x1 + md);
                b5 = x1 + x2;


                temperature = (Single)((b5 + 8) >> 4) / 10;

This was caused by x1 + md being 0.

Trying to bypass I tried

          
  if (x1 + md == 0)
            {
                temperature = 0;
            }
            else
            {
                x2 = mc * 2048 / (x1 + md);
                b5 = x1 + x2;


                temperature = (Single)((b5 + 8) >> 4) / 10;
            }

This made sure the calculateTemperature method was no longer crashing. But there was a new problem waiting.

 

Second time on the following line in the CalculatePressure method

          

  p = (b7 < 0x80000000 ? (b7 * 2) / b4 : (b7 / b4) * 2);

This is caused again by a divided by zero exception, where b4 is 0.

 

Trying to bypass I tried following code:

            
if (b4 == 0) p = 0; //It kept crashing here, /0 doesn't work.
            else p = (b7 < 0x80000000 ? (b7 * 2) / b4 : (b7 / b4) * 2);

And now it is always returning 236

 

06/01/2011 00:05:13: pressure: 236 altitude: 30344.2 free mem: 88488
06/01/2011 00:05:16: pressure: 236 altitude: 30344.2 free mem: 87744
06/01/2011 00:05:19: pressure: 236 altitude: 30344.2 free mem: 87972
06/01/2011 00:05:22: pressure: 236 altitude: 30344.2 free mem: 88716
06/01/2011 00:05:25: pressure: 236 altitude: 30344.2 free mem: 88716
06/01/2011 00:05:28: pressure: 236 altitude: 30344.2 free mem: 88488
 
Problem solving! Many crashes in code that worked with you guys.
So something wrong with my wiring? I just took some pictures of my wiring, hope it helps. 

MyHookup.png
MyHookupNP2.png
MyHookUpSensor.png

Only mind the white wires, the other ones are for my OneWire Temperature sensor. (More here)
 
I tried the wiring schema Danger provided: 
  • Sensor Pin VIn --> Netduino Pin 5V
  • Sensor Pin GND --> Netduino Pin GND
  • Sensor Pin SDA --> Netduino Pin SDA
  • Sensor Pin SCL --> Netduino Pin SCL

But my sensor shows slightly different labels. 
I did it like this:
  • Sensor VCC => NP2 5V
  • Sensor GND => NP2 GND
  • Sensor DA/SDA => NP2 SD
  • Sensor CL/SCL => NP2 SC
 
Any thing else I could have screwed up? 
 
Thanks in advance!

Netduino 2 and Sparkfun BMP085

09 March 2014 - 06:04 PM

Moved to http://forums.netdui...fun-bmp085-i2c/


Netduino Plus 2 - First project blog

01 January 2014 - 12:10 PM

I'm new to Netduino and this is my first project :) 

It should become a temperature, barometric & humidity logger, but I'm not there yet. 

 

See my progress at 

http://netduinoblog.wordpress.com

 

What do you guys think?


Netduino and my Xperia X10

13 December 2013 - 08:11 AM

Hi everyone, 

 

I 've read articles where people have connected an old Nokia Phone screen to Arduino http://www.instructa...okia-Color-LCD/. I was wondering if anyone has tried this with the screen of an old Android phone. I have a broken Sony Ericsson Xperia X10 lying around, wondering if I could put it to some use. 

 

Kind regards, 

Tobias


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.