diff --git a/docs/tildagon-apps/reference/badge-hardware.md b/docs/tildagon-apps/reference/badge-hardware.md index 6c5c998..79da90f 100644 --- a/docs/tildagon-apps/reference/badge-hardware.md +++ b/docs/tildagon-apps/reference/badge-hardware.md @@ -462,7 +462,7 @@ __app_export__ = ExampleApp ### Methods -The api currently only allows access to the raw data. +In order to support alternative imu devices a base set of functionality is provided along with i2c access to the device for apps to add functinality. An identify function is provided to determine which device is on the badge. Only the prototype badges have a different imu, but this may change in the future. | Method | Description | Arguments | Returns | @@ -470,6 +470,10 @@ The api currently only allows access to the raw data. | `acc_read()` | Get the accelerometer data. | None | `(x,y,z)`: The accelerometer data as a tuple of floats (m/s^2). | | `gyro_read()` | Get the gyro data. | None | `(x,y,z)`: The gyro data as a tuple of floats (d/s). | | `step_counter_read()` | Get the step count | None | `count`: The step count | +| `temperature_read()` | Get the temperature | None | `temerature`: Temperature (°).| +| `id()` | Get the device id | None | `id`: string id of device. | +| `readfrom()` | Read from a device register| `(register address, length)`: address to start read from, length of read | `data`: bytes of the data or -ve error code. | +| `writeto()` | Write data to a device register | `(register address, bytes)`: address to start write to, data.| `error`: or None if ok. | ### Usage