smart phone集成了越来越多的sensor:accelerometer, light, proximity, magnetic, orientation, gyroscope等等。
sensors一般都是i2c接口的。
android 2.2的时候还是通过file操作的,android2.3已改成input方式。那时候turn-key做的不好, 需要DIY。
sensor需要calibration,每个sensor的校准原理不同:gsensor需要确定公差,psensor一般采用中断方式需要确定threshold,compass需要确定干扰磁场。