From: Bernhard Tittelbach Date: Sun, 14 Mar 2010 17:38:47 +0000 (+0000) Subject: echo RequestByte X-Git-Url: https://git.realraum.at/?a=commitdiff_plain;h=3b2641f41ef464980b5bf32cdf236b9d61d8ab13;p=svn42.git echo RequestByte --- 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"); }