Sensors connection to RPi



  • Hello everyone,
    I am working on a project and I am having a doubt regarding the connection of multiple sensors to Raspberry Pi 3 model B. I can connect the sensors with the help of their addresses and know what type(e.g. temp, humidity, IR, accelerometer, etc) of sensors they are. However, I have been given a task where upon as soon as the sensor is connected to RPi, the Rpi itself recognizes what type of sensor it is and then the reading values get stored in a table created regarding that specific sensor type. How can I identify the sensor type without knowing it?
    Any help is appreciated.

    Thanks


  • Mod

    without using Mysensors?
    If not, I2C sensors usually have the same address or a choice between 2 or 3, maybe you can make a list and check



  • I am not using Mysensors. For example, ADXL345 has address 0x00 and 0x53(slave) which is occupied on RPi along with other sensors and it gets disconnected. Upon reconnection how can the RPi recognize that its the same sensor or another based on the values of the sensor. Without hard coding the address of sensor on RPi.


  • Mod

    Maybe it is a question more for the raspberry forum. Anyway, there are multiplexer boards that allow you to use I2C devices that have same address. More than that I don't know, since the sensors isn't presenting itself you have to work on addresses or run all initialization sequence for all sensors and stop until you get a response for each address.



  • Thank you for your responses. I will look into it.


Log in to reply
 

Looks like your connection to MySensors Forum was lost, please wait while we try to reconnect.