fn on_start() -> MynewtResult<()> {
    console::print("on_start\n");
    // Blue Pill's internal temperature sensor
    let SENSOR_DEVICE = &init_strn!( "temp_stm32_0" );
    // Poll the sensor every 10,000 milliseconds (10 seconds)
    let SENSOR_POLL_TIME = 10000;
    // Sensor data will be transmitted to server as field `t`
    let TEMP_SENSOR_KEY = &init_strn!( "t" );
    // Sensor data is raw temperature in whole numbers (0 to 4095)
    let TEMP_SENSOR_TYPE = SENSOR_TYPE_AMBIENT_TEMPERATURE_RAW;
    // Poll the sensor every 10 seconds
    start_sensor_listener(SENSOR_DEVICE, TEMP_SENSOR_KEY, TEMP_SENSOR_TYPE, SENSOR_POLL_TIME) ? ;
    // Start connecting to NB-IoT network in a background task
    sensor_network::start_server_transport() ? ;

    // Return success to `main()` function
    Ok(())
}
// This Rust program polls the internal temperature sensor every
// 10 seconds and sends the sensor data to the server over NB-IoT.
/// Will be run upon startup to initialise the app
This Rust program polls the internal temperature sensor every
10 seconds and sends the sensor data to the server over NB-IoT.
Will be run upon startup to initialise the app
This Rust program polls the internal temperature sensor every 10 seconds and sends the sensor data to the server over NB - IoT . Will be run upon startup to initialise the app
fn on_start() -> MynewtResult<()> {
    console::print("on_start\n");
    // Blue Pill's internal temperature sensor
    let SENSOR_DEVICE = &init_strn!( "temp_stm32_0" );
    // Poll the sensor every 10,000 milliseconds (10 seconds)
    let SENSOR_POLL_TIME = 10000;
    // Sensor data will be transmitted to server as field `t`
    let TEMP_SENSOR_KEY = &init_strn!( "t" );
    // Sensor data is raw temperature in whole numbers (0 to 4095)
    let TEMP_SENSOR_TYPE = SENSOR_TYPE_AMBIENT_TEMPERATURE_RAW;
    // Poll the sensor every 10 seconds
    start_sensor_listener(SENSOR_DEVICE, TEMP_SENSOR_KEY, TEMP_SENSOR_TYPE, SENSOR_POLL_TIME) ? ;
    // Start connecting to NB-IoT network in a background task
    sensor_network::start_server_transport() ? ;
    // Return success to `main()` function
    Ok(())
}
fn on_start ( ) -> MynewtResult < ( ) > { console :: print ( " \n " ) ; // Blue Pill's internal temperature sensor let SENSOR_DEVICE = & init_strn ! ( " " ) ; // Poll the sensor every 10,000 milliseconds (10 seconds) let SENSOR_POLL_TIME = 10000 ; // Sensor data will be transmitted to server as field `t` let TEMP_SENSOR_KEY = & init_strn ! ( " " ) ; // Sensor data is raw temperature in whole numbers (0 to 4095) let TEMP_SENSOR_TYPE = SENSOR_TYPE_AMBIENT_TEMPERATURE_RAW ; // Poll the sensor every 10 seconds start_sensor_listener ( SENSOR_DEVICE , TEMP_SENSOR_KEY , TEMP_SENSOR_TYPE , SENSOR_POLL_TIME ) ? ; // Start connecting to NB-IoT network in a background task sensor_network :: start_server_transport ( ) ? ; // Return success to `main()` function Ok ( ( ) ) }
This Rust program polls the internal temperature sensor every
10 seconds and sends the sensor data to the server over NB-IoT.
This Rust program polls the internal temperature sensor every 10 seconds and sends the sensor data to the server over NB - IoT .