Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/carletonurocketry/fetcher

A QNX process for fetching data from sensors over I2C.
https://github.com/carletonurocketry/fetcher

c cli cli-tool cuinspace modular posix process qnx qnx-neutrino raspberry-pi-4 sensors sensors-data-collection unix

Last synced: about 1 month ago
JSON representation

A QNX process for fetching data from sensors over I2C.

Awesome Lists containing this project

README

        

# fetcher

A process for fetching data from sensors using the I2C protocol.

## Usage

See the help documentation with the command: `use fetcher`.

The output of fetcher looks like:

```console
Time: 1295 ms
Temperature: 25.02 C
Pressure: 99.94 kPa
...
```

Sensor data output can either be printed in plain-text, or it can be read from the named message queue
`fetcher/sensors`.

Messages on the message queue start with a one-byte type specifier which is one of the following:

```c
/** Describes possible data types that fetcher is capable of producing. */
typedef enum {
TAG_TEMPERATURE = 0, /**< Temperature in degrees Celsius */
TAG_PRESSURE = 1, /**< Pressure in kilo Pascals */
TAG_HUMIDITY = 2, /**< Humidity in % relative humidity */
TAG_TIME = 3, /**< Time in milliseconds */
TAG_ALTITUDE_SEA = 4, /**< Altitude above sea level in meters */
TAG_ALTITUDE_REL = 5, /**< Altitude above launch height in meters */
TAG_ANGULAR_VEL = 6, /**< Angular velocity in degrees per second */
TAG_LINEAR_ACCEL_REL = 7, /**< Relative linear acceleration in meters per second squared */
TAG_LINEAR_ACCEL_ABS = 8, /**< Absolute linear acceleration in meters per second squared */
} SensorTag;
```

Followed by data representing the measurement.

Temperature, pressure, humidity and altitude are floats.
Time is a 32 bit integer.
Linear acceleration and angular velocity are 3D vectors (`vec3d_t`) of 3 floats.

## Board ID EEPROM Encoding

In order for fetcher to recognize the sensors on the board, the EEPROM must encode the ID in this format:

```
CU InSpace
REV :



```

**Fields:**

- ``: The name of the board. Ex: `Sensor board`
- `REV `: The revision of the board. Ex: `REV B`
- ``: The identifier of the sensor. Ex: `MS5611`
- `

`: The 7 bit I2C address of the sensor in hexadecimal (without the leading 0x). Ex: `77`
- It is possible to have more than one address per sensor type for boards with duplicates

[packager]: https://github.com/CarletonURocketry/packager