sensor

Exposing multiple sensors on a single device to Windows Sensor API

回眸只為那壹抹淺笑 提交于 2019-12-11 14:09:50
问题 Windows introduced the Sensor API so you can create a HID device that provides data for one of their 18 supported type of sensors. I'm creating a device that has many of those sensors on-board, but reading through the documentation it's not clear how to use it with a multiple sensors coming from one USB device. The only solution I can think of would be to let my device be a 'composite USB device', and simulate 18 different HID devices. Is there a better way to support multiple sensors? 回答1:

How to programmatically turn GPS on and off in Windows Phone 7

馋奶兔 提交于 2019-12-11 12:14:58
问题 So far, to turn on and off the GPS device in Wp7, I do it in Settings Menu. Wonder If this can be done in code? Thanks ---------- Update Sorry for the confusion. Instead of turning GPS on and off, What I really mean is how to turn on and off the LOCATION in the Settings Menu of Wp7. 回答1: You can get the GPS data but you are not able to turn the sensor on or off via your application. The most you can do in your application is start the geolocation data acquisition and stop it. 回答2: Windows

2 PIR motion sensors +Arduino

爱⌒轻易说出口 提交于 2019-12-11 11:23:13
问题 My project is to allow automatic lightening by detecting motion using PIR Sensors. THis is what I want to do : when the first motion sensor "inputpin" is HIGH which means a motion1 is detected , ledPin1 is set to HIGH.... then I check the signal from the other PIR sensor "inputpin2" if it is HIGH ledPin3 should be HIGH , If it is LOW ledpin2 should be HIGH. I wrote this code , but what it actually do is after a motion is detected from the first sensor"inputPin" , ledPin3 is set to high as if

Get Rotation (Tilt) Angle In Landscape View - Android Java

ⅰ亾dé卋堺 提交于 2019-12-11 06:48:12
问题 I've scrounged the web in search of a good example or someone trying to attempt the same thing, but so far I haven't had much luck. I am trying to get my Devices rotation angle (If you can imagine) starting at 180° (Flat). As the user tilts the device left and right, the angle adjusts accordingly. And as it rotates I want to simply update a TextView. I'm just lost as to what this evolves, some people suggest a gyroscope, accelerometer, even a magnometer, or a combination. I've gotten a few

Question about the rotation of X axis on Android

℡╲_俬逩灬. 提交于 2019-12-11 06:07:19
问题 I want to detect the correct rotations around X axis with Android sensors. After googling, I find this code: public void onSensorChanged(SensorEvent event) { Sensor sensor = event.sensor; switch(sensor.getType()) { case Sensor.TYPE_ACCELEROMETER: mAcc = event.values.clone(); break; case Sensor.TYPE_MAGNETIC_FIELD: mMag = event.values.clone(); break; } if (mAcc == null || mMag == null) return; float R[] = new float[9]; if (SensorManager.getRotationMatrix(R, null, mAcc, mMag)) { SensorManager

How can sensor data be embedded in the advertising packet of the TI SensorTag cc2650?

倖福魔咒の 提交于 2019-12-11 04:35:38
问题 I'm trying to make the TI SensorTag (cc2650) connectionless (just constantly advertise sensor, like accelerometer, readings). In the SensorTag.c file in the base SensorTag project, I can see the static uint8_t advertData[] but I'm not sure if I can put dynamic sensor data in there (or if that's the right approach or where to find the GAP_ADTYPE_* list if that's needed). 回答1: I do not know anything about this device so my answer will be quite general. Yes you can broadcast your sensor's data

Selection of Sensor API on Win10

时光毁灭记忆、已成空白 提交于 2019-12-11 04:16:18
问题 I found there are two ways to use the Sensor API: 1.Windows.Devices.Sensors, like LightSensor class 2.Traditional Sensor API My device is Win10, and I knew the first method(Windows.Devices.Sensors) is modest to use; However, it need to use Universal Windows Platform(VS2015), but I don't want to use the UWP in this case. I want to know whether the second method(Traditional Sensor API) can be used in the Win10? Thanks! 来源: https://stackoverflow.com/questions/40232224/selection-of-sensor-api-on

Retrieve Intel PCH temperature with Powershell

醉酒当歌 提交于 2019-12-11 03:28:06
问题 I'm trying to retrieve the intel PCH temperature with powershell. I cannot find any way to retrieve this temperature using wmi. The chipset on my machine is HM77. I've tried reading through the data sheet provided on the intel site, but to no success. Does anyone know how to do this? Thanks. Note: I can read this intel PCH temperature sensor through the HWINFO application, so it can be done somehow. 回答1: I think I got it. In powershell command line I typed wmic and I entered "wmic:root\cli>"

Android sensors and thread

て烟熏妆下的殇ゞ 提交于 2019-12-11 03:24:04
问题 I want to create an application where my sensors get values in another thread while the main thread is still working. I tried with just another thread, but it didn't working. I tried with a service and a IntentService, but the sensors start after the main thread. My current code is this. MyService.java public class MyService extends IntentService implements SensorEventListener { public MyService() { super("MyService"); } Sensor mLight; SensorManager mSensorManager; float max; float currentLux

Android SensorTag: writeDescriptor failed

你。 提交于 2019-12-11 02:18:17
问题 Device for testing:android 4.4 Connection is working fine but the onDescriptorWrite Method of my callback is never called. And the bluetoothGatt and characteristics are got. But when I want to setCharacteristicNotification and writeDescriptor, no callback is recieved, including onDescriptorWrite and onCharacteristicChanged. The notification code is showed as following: private static void enableMagnetometerNotifications(BluetoothGatt bluetoothGatt) { UUID magnetServiceUuid = UUID.fromString(