This release is a pre-release and may not be stable for production use.
ADDPIO project
This project allows the Raspberry Pi* to access the sensors (accelerometer, gyroscope, …) and other IO of an Android* device, similar to the GPIO library. There is a corresponding Android app (ADDPIO on the Google Play Store) to run on the Android device(s). The Raspberry Pi and all Android devices must be connected to the same network. This uses UDP port 6297 to communicate. Create a new ADDPIO object passing the ip address (this is displayed on the Android app). The object has an input and output function that takes a type number and value. See below for the standard type number symbols or use the number displayed on the Android app. The Android sensors return an array of values (e.g. x,y,z). For ADDPIO sensor input the value parameter represents the index into the array of values returned by the sensor. For other input, the value is ignored. The Android app has several widgets for IO: buttons, LEDs, a touchpad, alarm, notification, and text. Read the ip address and available sensors from the Android app.
from ADDPIO import ADDPIO myHost = ADDPIO(“192.168.0.0”) myValue = myHost.input(ADDPIO.SENSOR_ACCELEROMETER,1) myValue = myHost.input(12345,47) myHost.output(ADDPIO.ALARM,1) myHost.output(ADDPIO.ALARM,0)
See the testADDPIO.py program for an example.
# Android sensors SENSOR_ACCELEROMETER SENSOR_AMBIENT_TEMPERATURE SENSOR_GAME_ROTATION_VECTOR SENSOR_GEOMAGNETIC_ROTATION_VECTOR SENSOR_GRAVITY SENSOR_GYROSCOPE SENSOR_GYROSCOPE_UNCALIBRATED SENSOR_HEART_BEAT SENSOR_HEART_RATE SENSOR_LIGHT SENSOR_LINEAR_ACCELERATION SENSOR_MAGNETIC_FIELD SENSOR_MAGNETIC_FIELD_UNCALIBRATED SENSOR_MOTION_DETECT SENSOR_ORIENTATION SENSOR_POSE_6DOF SENSOR_PRESSURE SENSOR_PROXIMITY SENSOR_RELATIVE_HUMIDITY SENSOR_ROTATION_VECTOR SENSOR_SIGNIFICANT_MOTION SENSOR_STATIONARY_DETECT SENSOR_STEP_COUNTER SENSOR_STEP_DETECTOR SENSOR_TEMPERATURE
# Android input/output BUTTON_1 input 0/1 BUTTON_2 input 0/1 LED_RED output 0/1 LED_GREEN output 0/1 LED_BLUE output 0/1 ALARM output 0/1 NOTIFICATION output any number TEXT output any number TOUCH_PAD_X_IN input 0-255 TOUCH_PAD_Y_IN input 0-255 TOUCH_PAD_X_OUT output 0-255 TOUCH_PAD_Y_OUT output 0-255
Raspberry Pi is a trademark of the Raspberry Pi Foundation - http://www.raspberrypi.org
Android is a trademark of Google Inc.
Metadata
Release files for ADDPIO 1.0.3b1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ADDPIO-1.0.3b1.tar.gz | 4.7 kB | Without provenance | Details |
Release files / ADDPIO-1.0.3b1.tar.gz
| Download URL | ADDPIO-1.0.3b1.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4c1fd8063e84b3bc8ff654789e2797623c2543d53cebc581008945cd59cd0dc6
|
|
BLAKE2b-256 checksum How to use checksums |
6df592675848fd6a16877acc0f88462d38621d93fe4a37c4ca27687001d2c429
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for ADDPIO 1.0.3b1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.