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's Content

There have been 32 items by Tobias Vandenbempt (Search limited from 28-April 23)


By content type

See this member's


Sort by                Order  

#56989 NP2 & Sparkfun BMP085 (I2C)

Posted by Tobias Vandenbempt on 22 March 2014 - 08:53 AM in Netduino Plus 2 (and Netduino Plus 1)

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!



#56725 Netduino 2 and Sparkfun BMP085

Posted by Tobias Vandenbempt on 09 March 2014 - 06:04 PM in Netduino 2 (and Netduino 1)

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




#56691 Netduino 2 and the Adafruit BMP085 Barometer (I2C)

Posted by Tobias Vandenbempt on 07 March 2014 - 11:55 AM in Netduino 2 (and Netduino 1)

Hi everyone, 

 

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!
 
 
 



#55126 Netduino Plus 2 - First project blog

Posted by Tobias Vandenbempt on 02 January 2014 - 07:40 AM in Project Showcase

Your blog looks very interesting, I've done a bit of work with temperature/humidity myself, so I look forward to seeing what you come up with!

 

I noticed that a while ago you were having trouble with your I2C pressure sensor, I'm no expert, but if you're still having problems let me know and we can try to work it out.

 

Keep up the excellent work!

I have 2 I2C sensors ready to be implemented. However I need to solder them to make them work I guess. Not getting much results with just sticking the pins in the holes :)

 

So first thing is to buy me a soldering pen. 

 

I'll keep the blog up to date! :)




#55099 Netduino Plus 2 - First project blog

Posted by Tobias Vandenbempt on 01 January 2014 - 12:10 PM in Project Showcase

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?




#54661 Netduino and my Xperia X10

Posted by Tobias Vandenbempt on 13 December 2013 - 08:11 AM in General Discussion

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




#54288 Pull-up resistors on i2c bus. Enough is enough?

Posted by Tobias Vandenbempt on 25 November 2013 - 03:12 PM in General Discussion

Hey, 

 

I'm a beginner in Netduino and I've bought myself the microcontroller and the BMP085 ( amongst other things)

 

I have no experience regarding the wiring of I2C board. Can someone help me get on my way? 

 

I've bought this version, so no pull up resistors are required if I understood correctly.

https://www.sparkfun.../products/11282

 

You can follow my progress on http://netduinoblog.wordpress.com

 

Thanks in advance, 

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.