Skip to content
Snippets Groups Projects
Commit ceafcb14 authored by Zhiying Li's avatar Zhiying Li
Browse files

move control_motion to onReceiveData function

parent a23e607d
Branches
No related merge requests found
......@@ -107,7 +107,8 @@ void OnDataRecv(const uint8_t * mac, const uint8_t *incomingData, int len) {
count_var = 0;
count = 0;
print_count=0;
change_count = 0;
change_count = 0;
control_motion();
}
// =============================== All the setup ===========================================
......@@ -227,7 +228,7 @@ void loop()
print_received_Data();
//-------------------------------------------------------------------------------------
control_motion();
// control_motion();
//-------------------------------------------------------------------------------------
}
// ================================== ^ Main loop ^ ===================================================
......@@ -284,7 +285,7 @@ void print_received_Data(){
Serial.println(Rec_dir3);
Serial.print("Rec_dir4:");
Serial.println(Rec_dir4);
Serial.println("_________________________");
Serial.println("_________________________");
}
print_count +=1;
}
......@@ -315,5 +316,5 @@ void send_message(){
Serial.println("Error sending the data");
}
//-------------------------------------------------------------------------------------
delay(50); // delay 50 ms after send out the message
// delay(50); // delay 50 ms after send out the message
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment