Page 6 of 9
Re: Digital pressure sensor Driver
Posted: Mon Jun 06, 2016 10:24 pm
by RoccoMarco

We will update readme as soon as EX reach a equilibrium point! Thanks for the notice.
Ciao,
RM
Re: Digital pressure sensor Driver
Posted: Wed Jun 08, 2016 6:28 pm
by barthess
Hi there.
1) I see problem in thermometer and barometer API.
I do not know barometers and thermometers with settable
sensitivity. They have resolution instead.
2) All sensors return just MSG_OK/MSG_RESET. What
about returning error mask/number? Or additional API
call like getLastError(sensor *ptr)?
Re: Digital pressure sensor Driver
Posted: Thu Jun 09, 2016 8:22 am
by RoccoMarco
Hi barthess,
thanks for this precious feedback. I am working on a restyle of the current implementations. We are far from the definitive version and the idea is to improve driver until we have something suitable for most common uses.
Note that bias and sensitivity are two abstract concept related to a linear correction according to formula
Sens * Data + Bias = Cooked
Whereas Data is a 1xn vector, Sens is a nxn matrix and Bias is a 1xn vector. Since cross sensitivity values are almost 0 in our model we are considering Sensitivity like a nx1 vector.
By the way:
The second point... My bad! I have to improve the whole error management. Thanks for notice me.
Re: Digital pressure sensor Driver
Posted: Fri Jun 10, 2016 7:06 pm
by barthess
Hm... ok, let it be abstract characteristic. But BMP085 for example has
settable (via API?) resolution and hardwired sensitivity. Also
RoccoMarco wrote:Sens * Data + Bias = Cooked
formula is incorrect for pressure calculation. Any way, I have
no ideas about common abstract interface for all kind of
MEMS sensors. I have try hard to create such interface
and best achieved conception you can found here
https://github.com/barthess/u2/tree/mas ... rc/sensorsI still think it is ugly but have no better ideas.
Re: Digital pressure sensor Driver
Posted: Fri Jun 10, 2016 8:28 pm
by RoccoMarco
Thanks a lot barthess,
i will take a look to compensation methods for barometers. Do you have further reading to suggest me?
Re: Digital pressure sensor Driver
Posted: Fri Jun 10, 2016 9:42 pm
by barthess
RoccoMarco wrote:i will take a look to compensation methods for barometers.
All that compensation magic goes from IC's datasheet.
RoccoMarco wrote:Do you have further reading to suggest me?
No. That is all I have. All future way is full of
your trials and errors in
context of
current projects. There is no
spoon silver bullet.
Re: Digital pressure sensor Driver
Posted: Fri Jun 10, 2016 9:45 pm
by RoccoMarco
Thanks. We will improve it.
Re: Digital pressure sensor Driver
Posted: Fri Jun 10, 2016 10:06 pm
by tfAteba
Hi all,
For me I think it is very difficult to make a generic driver to fit to all existing sensors. Some time it will be necessary to customize or modify an existing driver for some people.
But It is interresting to propose a driver that cover a larger number of sensor.
regards,
Theo.
Re: Digital pressure sensor Driver
Posted: Fri Jun 10, 2016 10:24 pm
by Giovanni
It does not have to cover all features, it has to cover common features. Specific features can be covered with configuration or custom functions. Configuration is the preferred way of course.
Giovanni
Re: Digital pressure sensor Driver
Posted: Fri Jun 10, 2016 11:09 pm
by tfAteba
That sounds good for me
Theo