현성 김 / Mbed 2 deprecated 181202_Castone_design_master

Dependencies:   mbed nRF24L01P

Revision:
6:42ecdff5956a
Parent:
5:ad66d64c3d33
Child:
7:faf9014d2512
--- a/main.cpp	Thu Nov 15 07:40:02 2018 +0000
+++ b/main.cpp	Wed Nov 21 08:27:33 2018 +0000
@@ -1,7 +1,6 @@
 #include "mbed.h"
 #include <RF24Network.h>
 #include <RF24.h>
-#include <SoftPWM.h>
 #include "beep.h"
 
 /* Set */
@@ -38,24 +37,25 @@
 void endBeep();
 void goForward();
 
+void initLED() {    
+    led_R=1;
+    led_G=1;
+    led_B=1;
+}
+
 int main() {
-    led_R=0.5;
-    led_G=0.4;
-    led_B=1;
+    
+    initLED();
     beepStart();
     pc.baud(115200);
     radio.begin();
     network.begin(/*channel*/ 90, /*node address*/ addr);
     wait(2.0f);
     
- //   goForward();
-    
     // Display the (default) setup this node
     pc.printf("My ADDR : %d\r\n", NODE_ADDR);
     pc.printf("Complete Setting\r\n");
- //   beepAfterset();
     
-    led_B.write(0.5);
     while(1) {
         // Network should be updated regularly to keep layer going
         network.update();
@@ -78,12 +78,6 @@
     motor_LB = 1;
 }
 
-void onLED(int r, int g, int b)
-{
-    
-}
-
-
 /*
 
 // The nRF24L01+ supports transfers from 1 to 32 bytes, but Sparkfun's