Is there a way to get the tail’s device id? (not the imp’s, so not hardware.getdeviceid()
Also, if I needed to hook up several separate sensors, and I wanted to get the metrics from these sensors along with the id of each to differentiate between them, how can I get the id of these?
If they’re all on the i2c bus you can do a bus scan and identify devices (from a limited subset, not totally uniquely) by looking at the addresses that respond on the bus?
As @mlseim says, a Tail doesn’t have a unique ID. Individual sensors don’t have IDs as such. I2C-connected sensors have unique addresses on the bus, which each sensor’s datasheet will list, allowing you to talk to them specifically in code. Other buses work in different ways, sometimes without addresses, so how you proceed will depend on which sensors you want to use and how those sensor expect to connect to the host (ie. the imp’s breakout board). Again, the info you need will be in the datasheet.
I need to connect 3 temperature sensors, digital most probably, and they will be measuring the temperature of 3 different things.
I still didn’t get the HW to test the bus scanning code but will update the thread when I do.
Thanks!
So you solder the address points differently on each breakout board and use one i2c bus. In this breakout board, the temp range is -25°C to +85°C
If your temperature measurements require a thermocouple, like a stainless type-k probe in a tank or some process, you would need a different breakout board.
We’ll be experimenting with different types. The ones I’m getting for now are like this https://www.sparkfun.com/products/10988 but I will most probably need a probe as well
In that case, they will not be addressable unless they are part of a breakout board that supports i2c (addressable bus). You will have to use an imp003 (imp001 won’t have enough pins). Each sensor will be it’s own analog input. Accuracy is +/- 2C.
For thermocouples you would be using something like this:
Specifically Type-K. Also, that breakout board is not addressable.
Going back to temp sensors that are addressable …
Here’s a breakout board that will allow 8 on a single i2c bus:
So you can see that price, accuracy, physical construction, temp ranges, etc will all be part of your decision, along with how many physical imp inputs you need. Anything that is analog only will require proper shielding, grounding, wire length specs, etc.
The biggest decision is cost vs accuracy. If you want really accurate measurements, you’ll be spending a lot of money. Analog stuff is always more expensive.
Yes, you can use digital sensors too. You should read the Imp Pin Mux to get an idea as to which pins have which capabilities – this will help you plan out your sensor circuit(s), as will ‘How to Assign Roles to imp Pins’.
If you are using our standard Dev Kit, check out our April GPIO chart desktop reference.