leinardi / androidthings-drivers Goto Github PK
View Code? Open in Web Editor NEWAndroid Things open source peripheral drivers
License: Apache License 2.0
Android Things open source peripheral drivers
License: Apache License 2.0
First of all thanks for all the hard work and effort to provide all these drivers.
In in the following setup:
The accelerometer values in the device reference that I'm reading are -0.45, -0.02, 9.48 on the x, y, z axes. These look to be barely off.
However the magnetic field is way off. I'm getting 0.26, 0.19, -0.14 in the callback listener for Sensor.TYPE_MAGNETIC_FIELD. Inspecting the readRawMagnetometerData method shows in the result array 185, 1329, -994.
To make things even more confusing for me the Android documentation specifies that the values returned for the magnetic field are in uT https://developer.android.com/reference/android/hardware/SensorEvent.html#values
Did I end up with a bad LSM9D1 or I'm doing some wrong assumption on the expected values?
I use the same code as simple code ,I didn't change the distance of the sensor.
get below logs :
019-12-19 20:17:24.972 300-462/system_process D/WificondControl: Scan result ready event
2019-12-19 20:17:26.985 2233-2233/cn.dbyl.study I/CarSys: sensor changed: [-1.000000]
2019-12-19 20:17:28.996 2233-2233/cn.dbyl.study I/CarSys: sensor changed: [12.862785]
2019-12-19 20:17:31.009 2233-2233/cn.dbyl.study I/CarSys: sensor changed: [-1.000000]
2019-12-19 20:17:33.023 2233-2233/cn.dbyl.study I/CarSys: sensor changed: [11.111112]
2019-12-19 20:17:35.033 2233-2233/cn.dbyl.study I/CarSys: sensor changed: [75.510902]
2019-12-19 20:17:35.035 2233-2233/cn.dbyl.study I/CarSys: sensor changed: [74.051178]
I am having a problem when using the DS3231 clock module: I can read and write the RTC clock module normally, and I connect the RTC clock module to the Raspberry Pi, reboot the Raspberry Pi, the date read again is wrong, not the time that I previously written in.
But as long as the Raspberry Pi does not reboot, the time I read and write is correct.
Have you encountered this problem?
@leinardi
Hi,
Nice work on your Java library of sensors. You may be interested in the ones I have written for my own Java device I/O library.
See:
I'm think I should make it easier to port my code to Android Things, should be simply a matter of providing a similar I2C / SPI API.
Matt
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.