whack a mole slave node

Dependencies:   mbed

Fork of ESE350-Whack-a-Mole by Eric Berdinis

Files at this revision

API Documentation at this revision

Comitter:
prithviganeshk
Date:
Sun Oct 18 21:09:36 2015 +0000
Parent:
1:3ead502a934a
Commit message:
whack a mole slave node final working

Changed in this revision

whack_slave.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 3ead502a934a -r da2bbdea23a3 whack_slave.cpp
--- a/whack_slave.cpp	Sat Oct 17 23:05:52 2015 +0000
+++ b/whack_slave.cpp	Sun Oct 18 21:09:36 2015 +0000
@@ -81,7 +81,7 @@
 int main (void)
 {
     //Set the channel of the slave
-    uint8_t channel = 15;
+    uint8_t channel = 14;
     mrf.SetChannel(channel);
     
     //Analog input
@@ -115,7 +115,7 @@
                         
                     current = timer.read_ms();    
                     val = button.read();
-                    if(val <= 0.4){                       
+                    if(val >= 0.3 && val < 0.6){                       
                         strcpy(txBuffer, "y"); ///send "y" if press
                         break;
                     }