From 1096988609d6c1a57923bb04c9990bd56f4ffc48 Mon Sep 17 00:00:00 2001
From: Zhaoliang <zhz03@g.ucla.edu>
Date: Sun, 31 Oct 2021 17:59:31 -0700
Subject: [PATCH] update readme

---
 Code/Control/Laptop_Code/README.md | 91 +++++++++++++++++++++++++++++-
 1 file changed, 90 insertions(+), 1 deletion(-)

diff --git a/Code/Control/Laptop_Code/README.md b/Code/Control/Laptop_Code/README.md
index 16fa2cb..fbdeb70 100644
--- a/Code/Control/Laptop_Code/README.md
+++ b/Code/Control/Laptop_Code/README.md
@@ -2,6 +2,34 @@
 
 ## 1 Main structure 
 
+├─ball_detection
+│  ├─distance-detection-torch
+│  │  └─__pycache__
+│  ├─model_weights
+│  └─__pycache__
+├─basic_comm_test
+│  ├─ESP32_master
+│  └─ESP32_slave
+├─ESP32_AT
+│  └─__pycache__
+├─ESP32_slave
+├─Figs
+├─main_backup
+├─previous_high_level
+├─Previous_low_level
+│  ├─ESP32_master
+│  └─ESP32_slave
+├─simple_pid
+│  └─__pycache__
+├─system_description
+├─Test_keyboard
+├─Test_PID
+│  └─test_pid
+├─Two_Lidars_comm_test
+│  ├─ESP32_master
+│  └─ESP32_slave
+└─__pycache__
+
 ## 2 Software Requirements
 
 ### Step 1: 
@@ -38,6 +66,67 @@ pip install pyserial
 pip install pygame
 # install cv2
 pip install opencv-python
-# install 
+# install torch 
+conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch
+# install pupil-apriltags
+pip install pupil-apriltags
+```
+
+## 3 Main_code
+
+There are two files about main code: 
+
+- constants.py: it stores global variables that can be changed easily
+
+- main_keyboard: it has keyboard interruption and it contains all the functions that we need.
+
+### 3.1 Flowchart
+
+![](\Figs\flowchart_old.png)
+
+### 3.2 Functions name and their inputs outputs
+
+All function: 
+
+```
+init()
+auto_init()
+auto_control()
+	main_control()
+	ball_detect()
+	ball_capture()
+	goal_detect()
+	move2goal()
+	rotate_one_direction()
+	move2ball()
+	
+serial_port_out()
+
+```
+
+
+
+```python
+init()
+    """
+    Description:
+
+    Input:
+        no 
+    Output:
+        no 
+    """
+```
+
+```python
+auto_init()
+"""
+    Description:
+		
+    Input:
+        no 
+    Output:
+        no 
+"""
 ```
 
-- 
GitLab