# [−][src]Function app::app_network::send_sensor_data

    pub fn send_sensor_data(val: &SensorValue) -> MynewtResult<()>

Compose a CoAP JSON message with the Sensor Key (field name) and Value in `val` and send to the CoAP server. The message will be enqueued for transmission by the CoAP / OIC Background Task so this function will return without waiting for the message to be transmitted. Return `Ok()` if successful, `SYS_EAGAIN` if network is not ready yet. For the CoAP server hosted at thethings.io, the CoAP payload should be encoded in JSON like this:

    {"values":[
      {"key":"device", "value":"0102030405060708090a0b0c0d0e0f10"},
      {"key":"t",      "value":1715}
    ]}

# 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`)