My Mobile Phone's Senses

Peter Rukavina

I’ve been experimenting with Termux on my Moto G7 Play. While my route in was looking for a terminal emulator for the phone, I’ve since discovered that Termux us much, much more than that.

For example, I can run Node-RED on my phone via Termux, which gives me a rich visual programming tool for wiring up inputs to outputs.

What kinds of inputs, you ask?

Well, via Termux: API, I gain access to all of the sensors on my phone. And it turns out there are a lot of them:

# termux-sensor -l
{
  "sensors": [
    "LSM6DSM Accelerometer",
    "MMC5603NJ Magnetometer",
    "MMC5603NJ Magnetometer Uncalibrated",
    "LSM6DSM Gyroscope",
    "LSM6DSM Gyroscope Uncalibrated",
    "EPL259x ALS\/PS PROX",
    "EPL259x ALS\/PS ALS",
    "LSM6DSM Accelerometer -Wakeup Secondary",
    "MMC5603NJ Magnetometer -Wakeup Secondary",
    "MMC5603NJ Magnetometer Uncalibrated -Wakeup Secondary",
    "LSM6DSM Gyroscope -Wakeup Secondary",
    "LSM6DSM Gyroscope Uncalibrated -Wakeup Secondary",
    "EPL259x ALS\/PS PROX -Non Wakeup Secondary",
    "EPL259x ALS\/PS ALS -Wakeup Secondary",
    "Gravity",
    "Linear Acceleration",
    "Rotation Vector",
    "Step Detector",
    "Step Counter",
    "Significant Motion Detector",
    "Game Rotation Vector",
    "GeoMagnetic Rotation Vector",
    "Tilt Detector",
    "Android Stationary Detector",
    "Android Motion Detector",
    "Gravity -Wakeup Secondary",
    "Linear Acceleration -Wakeup Secondary",
    "Rotation Vector -Wakeup Secondary",
    "Step Detector -Wakeup Secondary",
    "Step Counter -Wakeup Secondary",
    "Game Rotation Vector -Wakeup Secondary",
    "GeoMagnetic Rotation Vector -Wakeup Secondary",
    "Chop Chop Gesture",
    "Moto Glance Gesture",
    "Camera Gesture",
    "Stowed",
    "Display Rotate",
    "Flatup",
    "Flatdown",
    "LTS Gesture",
    "FTM Gesture",
    "LTV Gesture",
    "Off Body",
    "capsense_top",
    "capsense_bottom"
  ]
}

Lots more experimenting to do now!

Comments

Submitted by Frank Meeuwsen on

Permalink

I am very curious what movement enables the "Chop Chop Gesture" and how you will use it for your own projects!

Submitted by Jarek on

Permalink

On my older Moto G5, "chop" gesture is two rapid "karate chop" motions (as you would make from the elbow down, though for the phone doing it with only the wrist is sufficient), with the face of the phone held parallel to the plane of movement. It defaults to turning the flashlight on or off. (And the "camera gesture" is two twists of the wrist.)

Add new comment

Plain text

  • Allowed HTML tags: <b> <i> <em> <strong> <blockquote> <code> <ul> <ol> <li>
  • Lines and paragraphs break automatically.

About This Blog

Photo of Peter RukavinaI am . I am a writer, letterpress printer, and a curious person.

To learn more about me, read my /nowlook at my bio, listen to audio I’ve posted, read presentations and speeches I’ve written, or get in touch (peter@rukavina.net is the quickest way). 

You can subscribe to an RSS feed of posts, an RSS feed of comments, or a podcast RSS feed that just contains audio posts. You can also receive a daily digests of posts by email.

Search