Jan 04

Using the Android Sensor Simulator

 

Sensor Simulator

Took a sidestep here. I decided to investigate using the sensor capabilities of the Android. This is a native functionality that I potentially could store the data into a Drupal “warehouse” capability.

  1. Download the latest sensorsimulator-x.x.x.zip from the download tab and unzip (if you didn’t already).
  2. In Eclipse
    1. make sure the Google APIs are loaded
    2. To access the Eclipse AVD Manage windows->AVD manager. My avd name was “my_avd”
    3. Start the Android emulator by selecting the avd and click “Start”, On the next screen click “Launch”.
  3. Start sensorsimulator-2.0-rc1/bin/sensorsimulator-x.x.x.jar (Java standalone application) in the bin folder.
  4. Install apk file in emulayot
    ./adb -e install -r ~/downloads/sensorsimulator-2.0-rc1/bin/SensorSimulatorSettings-2.0-rc1.apk
    The message that returns is:
    “455 KB/s (49681 bytes in 0.106s)
    pkg: /data/local/tmp/SensorSimulatorSettings-2.0-rc1.apk
    Success”
  5. Launch SensorSimulator on the emulator. I had to fool around with the apps fumction in the emulator. I finally went to application manager and found that the sensor simulator was installed. It eventualy showed up in the apps screen (I don’t know what I did). I clicked “test” and used the default IP and Port values that were set. I then did a “connect” and all the vaues read fine. The IP address and socket (port) number can be changed, if desired.

The sensor simulator jar file allows the user to set various sensor test values

The sensor simulator android app connects to the ip/port and reads the values set.

 

Older posts «