From 3b2641f41ef464980b5bf32cdf236b9d61d8ab13 Mon Sep 17 00:00:00 2001 From: Bernhard Tittelbach Date: Sun, 14 Mar 2010 17:38:47 +0000 Subject: [PATCH] echo RequestByte --- powersensordaemon/sampledev.txt | 1 + rf433ctl/rf433ctl.pde | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/powersensordaemon/sampledev.txt b/powersensordaemon/sampledev.txt index 110118a..e8ca9d7 100644 --- a/powersensordaemon/sampledev.txt +++ b/powersensordaemon/sampledev.txt @@ -1 +1,2 @@ temp0 T +photo0 P diff --git a/rf433ctl/rf433ctl.pde b/rf433ctl/rf433ctl.pde index f83a680..915f298 100644 --- a/rf433ctl/rf433ctl.pde +++ b/rf433ctl/rf433ctl.pde @@ -308,6 +308,12 @@ boolean pb_state=0; boolean pb_postth_state=0; unsigned int pb_time=0; +void echoCommand(char command) +{ + Serial.print(command); + Serial.print(": "); +} + void loop() { ir_time--; @@ -387,10 +393,15 @@ void loop() else if(command == 'h') send_frame(words[D2_OFF]); else if(command == 'T') + { + echoCommand(command); printTemperature(onShieldTemp); + } else if(command == 'P') + { + echoCommand(command); printLightLevel(); - + } else Serial.println("Error: unknown command"); } -- 1.7.10.4