From ecff49265dda8c43c3c2b15a66acca69bf598e38 Mon Sep 17 00:00:00 2001 From: maniacbug Date: Wed, 21 Aug 2013 16:35:49 -0700 Subject: [PATCH] Receive and print calibration messages --- examples/sensornet/sensornet.pde | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/examples/sensornet/sensornet.pde b/examples/sensornet/sensornet.pde index f6fd9c33..2a353cd7 100644 --- a/examples/sensornet/sensornet.pde +++ b/examples/sensornet/sensornet.pde @@ -336,6 +336,13 @@ void loop(void) RF24NetworkHeader response_header(/*to node*/ header.from_node, /*type*/ 'C'); network.write(response_header,&response,sizeof(response)); } + else if ( header.type == 'C' ) + { + // This is a calibration message. Calculate the diff + uint16_t diff = message.temp_reading - measure_temp(); + printf_P(PSTR("%lu: APP Calibration received %04x diff %04x\n\r"),millis(),message.temp_reading,diff); + + } } }