Adafruit_Sensor
Adafruit_Sensor copied to clipboard
Normalized way for multiple sensor magnitudes
trafficstars
Hi! This library is very nice! But an event can't contain multiple values (because it is an union) neither the interface offers a way to provide them. I was checking some libraries for sensors to see how do you deal with that and I saw the following: In DHT you handle this doing dht.temperature().getSensor(&sensor); And in BMP183 you get the event and then bmp.getTemperature();
As you can see you handle this by two different ways and I think that a normalized way to do this would be great. I am doing a library that needs sensors as much generic as possible and at this moment I can't use sensors as "generic" sensor when the sensor provides multiple values.
Thank you!