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.
Photo

Detecting Sensor Type


  • Please log in to reply
6 replies to this topic

#1 mohammad

mohammad

    Advanced Member

  • Members
  • PipPipPip
  • 79 posts

Posted 16 March 2012 - 01:44 AM

Hi all, Is it possible to know the types of sensors by writing an application in C#? Does Netduino compatible sensors support any attributes about their types or not? Thanks, Mohammad

#2 Magpie

Magpie

    Advanced Member

  • Members
  • PipPipPip
  • 279 posts
  • LocationAustralia (south island)

Posted 16 March 2012 - 08:32 AM

Hi Mohammad The short answer is no. Generally when you put together a circuit you know what you are connecting, so it is not necessary. Usb devices do have a discovery mechanism but I am fairly sure the Netduino usb connector cant be configured as a usb host anyway. Maybe if you give us more specific information about your needs there might be another way to do it.
STEFF Shield High Powered Led Driver shield.

#3 JerseyTechGuy

JerseyTechGuy

    Advanced Member

  • Members
  • PipPipPip
  • 870 posts

Posted 16 March 2012 - 12:47 PM

I've been theoretically working on this for my project but haven't put it into practical use, but it won't work exactly the way you are thinking. I have a number of sensors built into my project but there are 3 sensors that I have not added in, because I want them to be add-ons where someone can plug an external box in that contains 1 of these 3 sensors. In my case all 3 sensors are I2C. The scenario I have on paper is to try and initialize these sensors one by one. If the Initialization sequence fails (basically it is not found on the address) then it sets a flag so the code doesn't try to get readings from those sensors. But, as I said, it is theoretical right now and will only detect the fact that these 3 specific sensors are or are not connect.

#4 Dan Morphis

Dan Morphis

    Advanced Member

  • Members
  • PipPipPip
  • 188 posts

Posted 16 March 2012 - 05:19 PM


Usb devices do have a discovery mechanism but I am fairly sure the Netduino usb connector cant be configured as a usb host anyway.


Magpie,
IIRC, in the latest 4.2 beta firmware, Chris and company have added basic USB host support. I believe they have a keyboard working?

-dan

#5 Dan Morphis

Dan Morphis

    Advanced Member

  • Members
  • PipPipPip
  • 188 posts

Posted 16 March 2012 - 05:24 PM

I've been theoretically working on this for my project but haven't put it into practical use, but it won't work exactly the way you are thinking.

I have a number of sensors built into my project but there are 3 sensors that I have not added in, because I want them to be add-ons where someone can plug an external box in that contains 1 of these 3 sensors. In my case all 3 sensors are I2C.

The scenario I have on paper is to try and initialize these sensors one by one. If the Initialization sequence fails (basically it is not found on the address) then it sets a flag so the code doesn't try to get readings from those sensors.

But, as I said, it is theoretical right now and will only detect the fact that these 3 specific sensors are or are not connect.


Dave,
One wire has the ability to do pseudo discovery in that each device has a unique 64 bit serial number burned in at the factory. I haven't had a chance to look at the specs to see if there is a numbering convention one could use to do discovery of the actual type of the device.

-dan

#6 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 16 March 2012 - 07:02 PM

if there is a numbering convention one could use to do discovery of the actual type of the device.

Yep, the 1-wire serial number contains 'family code'.

#7 mohammad

mohammad

    Advanced Member

  • Members
  • PipPipPip
  • 79 posts

Posted 22 March 2012 - 05:50 PM

Thanks all for your replies. Consequently, at this time, it is not practical to detect sensors on Netduino without any clue from users. Am I right?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

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.