Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: pulga-lorawan-drv SPI_MX25R Si1133 BME280
Diff: main.cpp
- Revision:
- 56:39847849d219
- Parent:
- 47:b6d132f1079f
- Child:
- 59:a4fc1efb1569
--- a/main.cpp Tue Aug 20 15:01:49 2019 +0100
+++ b/main.cpp Wed Aug 21 07:01:49 2019 +0100
@@ -152,19 +152,19 @@
{
uint16_t packet_len;
int16_t retcode;
- float sensor_value;
+ int32_t sensor_value;
if (ds1820.begin()) {
ds1820.startConversion();
sensor_value = ds1820.read();
- printf("\r\n Dummy Sensor Value = %3.1f \r\n", sensor_value);
+ printf("\r\n Dummy Sensor Value = %d \r\n", sensor_value);
ds1820.startConversion();
} else {
printf("\r\n No sensor found \r\n");
return;
}
- packet_len = sprintf((char *) tx_buffer, "Dummy Sensor Value is %3.1f",
+ packet_len = sprintf((char *) tx_buffer, "Dummy Sensor Value is %d",
sensor_value);
retcode = lorawan.send(MBED_CONF_LORA_APP_PORT, tx_buffer, packet_len,