Detecting Sensor Type
Posted 16 March 2012 - 01:44 AM
Posted 16 March 2012 - 08:32 AM
Posted 16 March 2012 - 12:47 PM
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.
IIRC, in the latest 4.2 beta firmware, Chris and company have added basic USB host support. I believe they have a keyboard working?
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.
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.
Posted 16 March 2012 - 07:02 PM
Yep, the 1-wire serial number contains 'family code'.
if there is a numbering convention one could use to do discovery of the actual type of the device.
Posted 22 March 2012 - 05:50 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users