sensor

Access Android sensors via NDK

旧街凉风 提交于 2019-12-08 23:11:23
问题 I need read about 100 samples per second off the accelerometer on a Android, and at a fixed sample rate. The current sensormanager does or offers neither. I've read Need to read android sensors really fast He seems to have access to the driver code which made his life easier. I am curious if anyone has been able to do something like this through the NDK w/o that type of knowledge. Thanks in advance! 回答1: I have taken a look at sensor.h, and the API looks very promising; however, a little

Safran morpho finger print sensor integration with web java application

♀尐吖头ヾ 提交于 2019-12-08 15:35:08
问题 I have a requirement to integrate Safran morpho finger print sensor with existing java web application . As of now i have only safran morpho device. Please guide me to enable and integrate with web application. 回答1: here is your solution. please follow these steps: download these files. https://www.dropbox.com/s/65ztgdzga0l110w/For_Testing.rar?dl=0 install drivers and then test your device using MorphoTestPage.html. first copy html code. then javascript. then servlet. import java.io

vhdl-ultrasonic sensor(hc-sr04)

故事扮演 提交于 2019-12-08 14:09:05
问题 I have a project. In my project, I am creating a car that keeps the distance between anything next to the car and the car itself. But, coding is a headache for me. I created 3 different project, and all of them seemed to me okay. Yet none of them worked in practice. Then, I created this code(the most basic one to understand-- no component at all). The sensor need 10 us pulse and waits for new pulse for 100ms. When I send the trigger signal, sensor responses and sends a ultrasonic wave. While

Trying to read an ADC with Cython on an RPi 2 b+ via SPI (MCP3304, MCP3204, or MCP3008)?

此生再无相见时 提交于 2019-12-08 11:54:42
问题 I'd like to read differential voltage values from an MCP3304 (5v VDD, 3.3v Vref, main channel = 7, diff channel = 6) connected to an RPi 2 b+ as close as possible to the MCP3304's max sample rate of 100ksps. Preferably, I'd get > 1 sample per 100µs (> 10 ksps). A kind user recently suggested I try porting my code to C for some speed gains. I'm VERY new to C, so thought I'd give Cython a shot, but can't seem to figure out how to tap into the C-based speed gains. My guess is that I need to

How can my IntentService in background always listen to device's shake?

▼魔方 西西 提交于 2019-12-08 08:28:32
问题 I am developing an app which is basically one widget and one service. The widget is only a button which I want it to run the service in the device's background. So the user just clicks the button and nothing happens in the UI, the service starts in the background. But I want the background service, which I have implemented using IntentService, to ALWAYS listen to my device's shake in the background after the widget's button is clicked. It has to monitor the accelerometer sensor for any change

Connecting I2C Device to Labview using NI-845x

混江龙づ霸主 提交于 2019-12-08 08:23:11
问题 I'm trying to connect a mass flow sensor, SFM-3000 by sensorion, to labview on PC using USB device, NI-8452, which provide I2C interface. I followed the user manual of the sensor and used I2C example by labview but I cannot establish communication between them I get the error message: Error -301744 occurred at NI-845x I2C Run Script.vi:6110001, Possible reason(s): NI-845x: The I2C master lost arbitration and failed to seize the bus during transmission of an address+direction byte. I'm using

Orientation type of the sensor

ぐ巨炮叔叔 提交于 2019-12-08 06:31:54
问题 What data are used by orientation sensor in the android Samsung Galaxy S 2. Gyroscope's data or accelerometer's data? 回答1: I have recently answered a similar question (you can have a look here). The brief answer is this: "The methods included in the Android APIs to get the orientation does not include readings from the gyroscope sensor. Gyroscope does not provide information about orientation, since it only has information about rotation speed" . 回答2: Samsung Galaxy S2 has a boatload of

Why does camera frame rate fluctuate when fusing another sensor?

元气小坏坏 提交于 2019-12-08 06:30:19
问题 I am a new baby in Android programming so that I am facing a problem related to videos when doing my research project. In the project, we would like to build an application which uses both videos recorded by a built-in front camera and acceleration sensed by a built-in accelerometer. My problem is that the frame rate of these videos usually fluctuates from 15 fps to 30 fps even though I have set the camera fixed at 30 fps in the source code. I tried to close the data stream of the

How to change Android proximity sensor sensitivity?

故事扮演 提交于 2019-12-08 06:21:14
问题 I coded an app based on proximity sensor , but I would like to be able to give users the ability to change the sensitivity of the sensor. Is it possible? If yes how to do it? 回答1: Just "implements SensorEventListener" and follow the code : public void onCallStateChanged(int state, String incomingNumber) { switch (state) { case TelephonyManager.CALL_STATE_IDLE: System.out.println("My Call IDLE"); CallState = false; StartAudioSpeacker(); System.out.println("Is phone speaker : "+ audioManager

Device orientation data transformed to css behaves strange when using a real device

↘锁芯ラ 提交于 2019-12-08 05:30:03
问题 This question is in continue to a previous one: I've created a CSS widget mimicking the phone orientation (js fiddle). When using the dev-tools sensors tab, the widget works perfectly, transforming the event data to a CSS rotate3d string like so (answer by@Andrey): function degreesToRadians (deg) { return deg * Math.PI / 180; } class EulerAngles { constructor(alpha, beta, gamma) { this.alpha = alpha; this.beta = beta; this.gamma = gamma; } toRotate3DString() { const gammaAxisY = -Math.sin