sensor

How to access CPU's heat sensors?

杀马特。学长 韩版系。学妹 提交于 2019-11-28 19:24:26
I am working on software in which I need to access the temperature sensors in the CPU and get control over them. I don't know much hardware interfacing; I just know how to interface with the mouse. I have googled a lot about it but failed to find any relevant information or piece of code. I really need to add this in my software. Please guide me how to have the control over the sensors using C or C++ or ASM. Without a specific kernel driver, it's difficult to query the temperature, other than through WMI. Here is a piece of C code that does it, based on WMI's MSAcpi_ThermalZoneTemperature

Java based library for sensor data collection

自闭症网瘾萝莉.ら 提交于 2019-11-28 17:56:38
问题 I'm looking for an embeddable Java library that is suitable for collecting real-time streams of sensor data in a general-purpose way. I plan to use this to develop a "hub" application for reporting on multiple disparate sensor streams, running on a JVM based server (will also be using Clojure for this). Key things it needs to have: Interfaces for various common sensor types / APIs. I'm happy to build what I need myself, but it would be nice if some standard stuff comes out of the box.

BLE gatttool cannot connect even though device is discoverable with hcitool lescan

空扰寡人 提交于 2019-11-28 17:20:06
I'm running RPi with a USB Bluetooth dongle. When I use hcitool, I can discover the SmartTag device. But when I use gatttool, I cannot connect. It says "Host is down (112)". Here are my commands: $ sudo hcitool lescan LE Scan ... BC:6A:29:AB:DE:2B (unknown) BC:6A:29:AB:DE:2B SensorTag Checking for bluetooth adapters on my RPi I get: $ hcitool dev Devices: hci0 5C:F3:70:60:E6:1B Then, when I use the gatttool like this, I get: $ sudo gatttool -i hci0 -b BC:6A:29:AB:DE:2B -I [ ][BC:6A:29:AB:DE:2B][LE]> When I type connect, I get this: [ ][BC:6A:29:AB:DE:2B][LE]> connect Connecting... connect

JSR 256 battery events

一个人想着一个人 提交于 2019-11-28 13:04:44
How can I detect whenever the power cord is unplugged from electrical socket using JSR 256? You would add javax.microedition.io.Connector.sensor to the API Permissions tab of the Application Descriptor of the project properties. michael aubert From a quick look at the specifications of the JSR: (you might want to look for code examples, starting with Appendix D of the spec itself, the latest JavaME SDK, Sony Ericsson developer website, then google) As always, I would be worried about fragmentation in the diverse implementations of the JSR, but here's my first idea: import javax.microedition

Calculate Android sensor power consumption

霸气de小男生 提交于 2019-11-28 10:12:31
getPower() returns the power in mA used by a sensor while in use: Now, I need to calculate how much battery is used by the registration of the sensor. Does he value returned by getPower() indicate the mAH (mA per HOUR) or something else? If yes, is there a way to get the battery mAH in order to calculate the % of battery used by the sensor? Something quite related has been discussed in Google groups not too long ago. You can find the full thread here for reference. A small excerpt from the last reply in that thread, which should answer your question more or less: (...) the battery capacity is

calculate acceleration in reference to true north

牧云@^-^@ 提交于 2019-11-28 08:49:36
For my App I need to calculate the acceleration of my device in reference to true north. My idea was to calculate the device orientation to magnetic north and apply the declination to it to get the orientation to true north. Then I want to calculate the acceleration of the device and reference it to the orientation, but I do not know how I should do this. I would try to get the device orientation using SensorManager.getRotationMatrix() and SensorManager.getOrientation() . Then I get the declination by GeomagneticField.getDeclination() and apply it on the azimuth of the orientation values from

Get multiple sensor data at the same time in Android

独自空忆成欢 提交于 2019-11-28 07:37:18
问题 I am now trying to create an app to monitoring the vibration. I use accelerometer to finish the job, when the recorded acceleration exceed certain threshold, I call it a trigger. When there's a trigger, I want to log the acceleration, magnetic field, light level data (from different sensors) at the trigger time to a file. The problem now is that: I can get data from individual sensor, but couldn't figure out a way how to get the data from multiple sensors at the same time. For example: I can

View Sensor list on android device

江枫思渺然 提交于 2019-11-28 06:13:55
问题 I am a new to Android development and I would like to create an application which shows the list of sensors on my Android device. I tried to find this but without the success. Can you please help me. Here is the solution how to do this: /////////////// List of Sensors ////////////////////////////// listeCapteurs = (ListView) findViewById(R.id.ListView01); SensorManager sensorManager= (SensorManager)getSystemService(Context.SENSOR_SERVICE); List<Sensor> listSensor= sensorManager.getSensorList

Using orientation sensor to point towards a specific location

霸气de小男生 提交于 2019-11-28 06:04:30
I'm trying to implement an arrow that uses the orientation sensor in order to point towards a specific location. Google Places implements this arrow in a ListView for each place it finds. I've managed to get the azimuth, but given a location, I don't know how to proceed to calculate the angle I need. Moreover, I need to make the conversions from real north and magnetic north. Does anybody have an example of such implementation? Thanks in advance. I solved it. float azimuth = // get azimuth from the orientation sensor (it's quite simple) Location currentLoc = // get location from GPS or network

android compass seems unreliable

自作多情 提交于 2019-11-28 05:08:08
I have been working on a small compass app the past couple of days, and have gotten the code up and running, but it seems that the compass reading is not accurate. After calibrating both phones, my first test that i found this in what that i simply held the phone against and flat surface looked at the reading then flipped it horizontally and put it against the same flat surface (a 180* turn) and the value did not change 180* it was closer to 240*. I then tested the reading vs a compass, at times the reading seemed to be close but at other points it was more than 50* off. I even tried to put my