sensor

Is there a J2SE sensor API?

Does anyone know of a "standardized" Java API for working with sensors, and which is closely tied to J2ME as is the case with JSR 256? I'm writing a Java library for interfacing with a sensor network consisting of several different types of sensors (mostly simple stuff such as temperature, humidity, GPS, etc.). So far I've rolled my ow...

Switching Android SensorManager speed. What's a good practice?

Hello stackoverflow! I'm interested to switch between different sensor orientation speeds over time to optimize the program ie.. battery life. The routine may be called very often. I'm looking for the right practice. sensorManager = (SensorManager)getSystemService(Context.SENSOR_SERVICE); sensorManager.registerListener(s...

How can you develop for hardware connected to an iPhone OS device via the 30pin connector?

I have a small thermometer with a mini-usb connection. I would like to connect it via USB adapters to the 30pin connector on my iPhone. I am a paid dev ($99 version) and can't find much info on the hardware stuff. Is it possible to access this hardware with my current setup? I just want to access the data being generated via the temp...

I'm trying to make lots of the same object appear randomly on the screen subject to conditions and keep getting errors?

Hi! A good friend recommended this site to me, it looks really useful! I'm a bit of a shameless noob at actionscript and after 3 days of tutorials and advice I've hit a brick wall. I've managed to get a sensor attached to an arduino talking to flash using something called AS3glue. it works, when i set up a trace("leaf") for the contitio...

Data 'logger' turning off when phone goes to standbymode

I'm creating a datalogger which logs the gps data and the sensor data of the phone. I've just a strange problem. If the phone is not touched for few minutes it goes into standby mode (screen goes black), and that causes the logger to stop working. Actually the firewriting in the logger stops working. The GPS resumes fine after coming out...

Connection of phidgets accelerometer using Android OS

Hello, I'm newbie in Android (and programming) and I would like to connect an USB Phidgets accelerometer (product description) using Android OS. On his website, Phidgets gives code samples including JAVA and others (see previous hyperlink). Could someone tell me if these samples are supposed to work with Anrdoid OS ? Any other suggestio...

missing rrsensorapi.h for gathering sensor data from N97 Nokia device.

Hi everyone, I am quite new with symbian and c++. I try to use sensor on N97 device. I got error that rrsensorapi.h is not found. I have check through epoc folder it not there either. In this case, how can I find rrsensorapi? I have sensor.pri file like this INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE HEADERS += xqsensor.h \ xqaccsen...

Determining north using the android phone

I looked over SensorManager and was still unsure, how do I detect if the phone is looking at true north (or any other direction for that matter). ...

Multiple data series in real time plot

Hi, I'm kind of new to Python and trying to create a plotting app for values read via RS232 from a sensor. I've managed (after some reading and copying examples online) to get a plot working that updates on a timer which is great. My only trouble is that I can't manage to get multiple data series into the same plot. Does anyone have a s...

Display an Android Sensors List

I'm trying to display a list of available sensors but it's like there are not! I was thinking that it was because of the emulator, but i tried it on the phone and the result is the same. private SensorManager mSensorManager; TextView mSensorsTot,mSensorAvailables; ...... public void onCreate(Bundle savedInstanceState) { super.onC...

Need to calculate rotation-vector from Sensor.TYPE_ORIENTATION data

I need to calculate a rotation vector out of the data i get from Sensor.TYPE_ORIENTATION. The sensor data is defined like this: the values have to be recalculated to become a correct 3d position: values[0]: Azimuth, angle between the magnetic north direction and the Y axis, around the Z axis (0 to 359). 0=North, 90=East, 180=South, 27...

How to use onSensorChanged sensor data in combination with OpenGL

I have written a TestSuite to find out how to calculate the rotation angles from the data you get in SensorEventListener.onSensorChanged(). I really hope you can complete my solution to help people who will have the same problems like me. Here is the code, i think you will understand it after reading it. Feel free to change it, the main...

Obtaining data from Android sensors without Listeners

I have following code: public class readSensorsData extends Activity implements SensorListener { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); sm = (SensorManager) getSystemService(SENSOR_SERVICE); } @Override public voi...

Problem Showing Sensors Details

Hi, i'm looking to show detail about sensors in an Actvity but when i put my app in to my phone i manage to view only details about the accellerometer, but the program says that i have 4 sensors: Accellerometer, Magnetic field, Orientation and Temperature. I'm using Android 1.6 and a htc Tattoo for testing. This is my code: public cla...

How do I lock the layout of my android program to one orientation

I'm trying to write a program that needs smooth orientation sensor samples as the phone is rotated all around. Every time the orientation of the phone is changed, it interrupts the data and freezes the program while the layout changes. How can I lock it in one orientation (landscape or portrait, it doesn't matter)? I assume it has somet...

Using getRotationMatrix and getOrientation in Android 2.1

I've been having issues with this for far too long. This code should output dx,dy,dz for the accelerometer, and a running total of the dx. It should also output azimuth, pitch, and roll. I've used info from http://bit.ly/codeUsed, but to no avail. This code does not correctly output pitch, azimuth, or roll. It outputs 0.0, -0.0, -0....

Proximity Monitoring on the iPhone without blacking out the screen?

Hello all! I'm able to detect proximity on the iPhone SDK, but the screen blacks out whenever the proximity state is triggered. is there a way I can prevent the proximity sensor from blacking out the screen, but still monitor a proximity sensor's state? Thanks! ...

Android, Using the hardware compass.

Hi Guys, I can't find much information out there on Android's hardware compass. I keep trying to setup my criteria to force Android to use the hardware compass. Basically my problem is I want the bearing to update even while the device is stationary. From my understanding the GPS will only update your bearing when your moving. I'd like...

Data store appropriate for sensor data

Hi, What do you think is a data store appropriate for sensor data, such as temperature, humidity, velocity, etc. Users will have different sets of fields and they need to be able to run basic queries against data. Relational databases like MySQL is not flexible in terms of schema, so I was looking into NoSql approaches, but not sure ...

A weird phenomenon of SensorService

I'm trying to develop a service on android2.1 which can detect the movement of device in anytime. However, my service can't receive the X, Y, Z data in onSensorChanged method, and WindowOrientationListener in framework is received the data normally. I put some log in the codes and found that the FileDescriptor (handle->data[offset++]...