# [−][src]Crate app

Sensor app that reads sensor data from a temperature sensor and sends the sensor data to a CoAP server over NB-IoT. Note that we are using a patched version of apps/my_sensor_app/src/vsscanf.c that fixes AT response parsing bugs. The patched file must be present in that location. This is the Rust version of `https://github.com/lupyuen/stm32bluepill-mynewt-sensor/blob/rust-nbiot/apps/my_sensor_app/OLDsrc/main.c`

## Modules

app_network | Transmit sensor data to a CoAP server like thethings.io. The CoAP payload will be encoded as JSON. The sensor data will be transmitted over NB-IoT. Note that we are using a patched version of apps/my_sensor_app/src/vsscanf.c that fixes response parsing bugs. The patched file must be present in that location. This is the Rust version of `https://github.com/lupyuen/stm32bluepill-mynewt-sensor/blob/rust-nbiot/apps/my_sensor_app/OLDsrc/network.c`
app_sensor | Poll the temperature sensor every 10 seconds. Transmit the sensor data to the CoAP server after polling. This is the Rust version of https://github.com/lupyuen/stm32bluepill-mynewt-sensor/blob/rust-nbiot/apps/my_sensor_app/OLDsrc/sensor.c

## Functions

main | Main program that initialises the sensor, network driver and starts reading and sending sensor data in the background. main() will be called at Mynewt startup. It replaces the C version of the main() function.
panic | This function is called on panic, like an assertion failure. We display the filename and line number and pause in the debugger. From https://os.phil-opp.com/freestanding-rust-binary/

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g., `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g., `vec -> usize` or `* -> vec`)

Search multiple things at once by splitting your query with comma (e.g., `str,u8` or `String,struct:Vec,test`)