diff --git a/Graduation Project Documentation/Embedded/Test hardware components @11.md b/Graduation Project Documentation/Embedded/Test hardware components @11.md deleted file mode 100644 index 8b13789..0000000 --- a/Graduation Project Documentation/Embedded/Test hardware components @11.md +++ /dev/null @@ -1 +0,0 @@ - diff --git a/Graduation Project Documentation/Data/Data.md b/Graduation-Project-Documentation/Data/Data.md similarity index 100% rename from Graduation Project Documentation/Data/Data.md rename to Graduation-Project-Documentation/Data/Data.md diff --git a/Graduation Project Documentation/Data/create a database with different tables for the shelves, robots, users and products @23.md b/Graduation-Project-Documentation/Data/create a database with different tables for the shelves, robots, users and products @23.md similarity index 100% rename from Graduation Project Documentation/Data/create a database with different tables for the shelves, robots, users and products @23.md rename to Graduation-Project-Documentation/Data/create a database with different tables for the shelves, robots, users and products @23.md diff --git a/Graduation Project Documentation/Data/inspect some metrics like most poplar product @22.md b/Graduation-Project-Documentation/Data/inspect some metrics like most poplar product @22.md similarity index 100% rename from Graduation Project Documentation/Data/inspect some metrics like most poplar product @22.md rename to Graduation-Project-Documentation/Data/inspect some metrics like most poplar product @22.md diff --git a/Graduation Project Documentation/Data/keep track and analyze the products in the different shelves @20.md b/Graduation-Project-Documentation/Data/keep track and analyze the products in the different shelves @20.md similarity index 100% rename from Graduation Project Documentation/Data/keep track and analyze the products in the different shelves @20.md rename to Graduation-Project-Documentation/Data/keep track and analyze the products in the different shelves @20.md diff --git a/Graduation Project Documentation/Data/keep track and analyze the robots different attributes like battery life @21.md b/Graduation-Project-Documentation/Data/keep track and analyze the robots different attributes like battery life @21.md similarity index 100% rename from Graduation Project Documentation/Data/keep track and analyze the robots different attributes like battery life @21.md rename to Graduation-Project-Documentation/Data/keep track and analyze the robots different attributes like battery life @21.md diff --git a/Graduation Project Documentation/DevOps/CI-CD pipeline for the web application @25.md b/Graduation-Project-Documentation/DevOps/CI-CD pipeline for the web application @25.md similarity index 100% rename from Graduation Project Documentation/DevOps/CI-CD pipeline for the web application @25.md rename to Graduation-Project-Documentation/DevOps/CI-CD pipeline for the web application @25.md diff --git a/Graduation Project Documentation/DevOps/Create the cloud infrastructure, diagram and the cloudformation script @24.md b/Graduation-Project-Documentation/DevOps/Create the cloud infrastructure, diagram and the cloudformation script @24.md similarity index 100% rename from Graduation Project Documentation/DevOps/Create the cloud infrastructure, diagram and the cloudformation script @24.md rename to Graduation-Project-Documentation/DevOps/Create the cloud infrastructure, diagram and the cloudformation script @24.md diff --git a/Graduation Project Documentation/DevOps/Devops.md b/Graduation-Project-Documentation/DevOps/Devops.md similarity index 100% rename from Graduation Project Documentation/DevOps/Devops.md rename to Graduation-Project-Documentation/DevOps/Devops.md diff --git a/Graduation Project Documentation/Embedded/ARM embedded-c encoders code @14.md b/Graduation-Project-Documentation/Embedded/ARM embedded-c encoders code @14.md similarity index 100% rename from Graduation Project Documentation/Embedded/ARM embedded-c encoders code @14.md rename to Graduation-Project-Documentation/Embedded/ARM embedded-c encoders code @14.md diff --git a/Graduation Project Documentation/Embedded/Arduino Encoders code @12.md b/Graduation-Project-Documentation/Embedded/Arduino Encoders code @12.md similarity index 100% rename from Graduation Project Documentation/Embedded/Arduino Encoders code @12.md rename to Graduation-Project-Documentation/Embedded/Arduino Encoders code @12.md diff --git a/Graduation Project Documentation/Embedded/Embedded.md b/Graduation-Project-Documentation/Embedded/Embedded.md similarity index 89% rename from Graduation Project Documentation/Embedded/Embedded.md rename to Graduation-Project-Documentation/Embedded/Embedded.md index 490c024..7fcd7aa 100644 --- a/Graduation Project Documentation/Embedded/Embedded.md +++ b/Graduation-Project-Documentation/Embedded/Embedded.md @@ -6,4 +6,4 @@ [[PCB fabrication @16]] [[Robot mechanical design @13]] [[robot movement algorithm @19]] -[[Test hardware components @11]] +[[Test-hardware-components@11]] diff --git a/Graduation Project Documentation/Embedded/PCB design @15.md b/Graduation-Project-Documentation/Embedded/PCB design @15.md similarity index 100% rename from Graduation Project Documentation/Embedded/PCB design @15.md rename to Graduation-Project-Documentation/Embedded/PCB design @15.md diff --git a/Graduation Project Documentation/Embedded/PCB fabrication @16.md b/Graduation-Project-Documentation/Embedded/PCB fabrication @16.md similarity index 100% rename from Graduation Project Documentation/Embedded/PCB fabrication @16.md rename to Graduation-Project-Documentation/Embedded/PCB fabrication @16.md diff --git a/Graduation Project Documentation/Embedded/Robot mechanical design @13.md b/Graduation-Project-Documentation/Embedded/Robot mechanical design @13.md similarity index 100% rename from Graduation Project Documentation/Embedded/Robot mechanical design @13.md rename to Graduation-Project-Documentation/Embedded/Robot mechanical design @13.md diff --git a/Graduation-Project-Documentation/Embedded/Test-hardware-components@11.md b/Graduation-Project-Documentation/Embedded/Test-hardware-components@11.md new file mode 100644 index 0000000..20d91c2 --- /dev/null +++ b/Graduation-Project-Documentation/Embedded/Test-hardware-components@11.md @@ -0,0 +1,14 @@ +> ## ***This is a documentation for issue #11*** +> `Testing hardware components using arduino ide` + +## 1. Testing the 3 Motors using cytrons 1 channel. +- We provide speed and direction control of the 2 motors using 2 cytrons 1 channel, the third motor is used for the lifting mechanism so we only need direction control. + +## 2. Getting encoders readings. +- By comparing the two sets of pulses out of the encoder we can determine the direction of the motor. +- Depending on the direction we count rising edges of the pulses by interrupt to evaluate revolution per minite. + - `RPM = ( counts / encoder resolution )*60` +- Finally, we display the readings of counts, RPM and Motor direction on a serial monitor every 1 sec. + + + diff --git a/Graduation Project Documentation/Embedded/integrate ros with micro-controller in arduino @17.md b/Graduation-Project-Documentation/Embedded/integrate ros with micro-controller in arduino @17.md similarity index 100% rename from Graduation Project Documentation/Embedded/integrate ros with micro-controller in arduino @17.md rename to Graduation-Project-Documentation/Embedded/integrate ros with micro-controller in arduino @17.md diff --git a/Graduation Project Documentation/Embedded/integrate ros with micro-controller in embeded-c @18.md b/Graduation-Project-Documentation/Embedded/integrate ros with micro-controller in embeded-c @18.md similarity index 100% rename from Graduation Project Documentation/Embedded/integrate ros with micro-controller in embeded-c @18.md rename to Graduation-Project-Documentation/Embedded/integrate ros with micro-controller in embeded-c @18.md diff --git a/Graduation Project Documentation/Embedded/robot movement algorithm @19.md b/Graduation-Project-Documentation/Embedded/robot movement algorithm @19.md similarity index 100% rename from Graduation Project Documentation/Embedded/robot movement algorithm @19.md rename to Graduation-Project-Documentation/Embedded/robot movement algorithm @19.md diff --git a/Graduation Project Documentation/Pasted image 20221220203859.png b/Graduation-Project-Documentation/Pasted image 20221220203859.png similarity index 100% rename from Graduation Project Documentation/Pasted image 20221220203859.png rename to Graduation-Project-Documentation/Pasted image 20221220203859.png diff --git a/Graduation Project Documentation/README-images/canvas.png b/Graduation-Project-Documentation/README-images/canvas.png similarity index 100% rename from Graduation Project Documentation/README-images/canvas.png rename to Graduation-Project-Documentation/README-images/canvas.png diff --git a/Graduation Project Documentation/README-images/canvas2.png b/Graduation-Project-Documentation/README-images/canvas2.png similarity index 100% rename from Graduation Project Documentation/README-images/canvas2.png rename to Graduation-Project-Documentation/README-images/canvas2.png diff --git a/Graduation Project Documentation/README-images/obsidian-nodes.png b/Graduation-Project-Documentation/README-images/obsidian-nodes.png similarity index 100% rename from Graduation Project Documentation/README-images/obsidian-nodes.png rename to Graduation-Project-Documentation/README-images/obsidian-nodes.png diff --git a/Graduation Project Documentation/README.md b/Graduation-Project-Documentation/README.md similarity index 100% rename from Graduation Project Documentation/README.md rename to Graduation-Project-Documentation/README.md diff --git a/Graduation Project Documentation/Software/Create a 2d map to update robots and shelves locations @1.md b/Graduation-Project-Documentation/Software/Create a 2d map to update robots and shelves locations @1.md similarity index 100% rename from Graduation Project Documentation/Software/Create a 2d map to update robots and shelves locations @1.md rename to Graduation-Project-Documentation/Software/Create a 2d map to update robots and shelves locations @1.md diff --git a/Graduation Project Documentation/Software/Create a 2d map to update robots and shelves locations from database @2.md b/Graduation-Project-Documentation/Software/Create a 2d map to update robots and shelves locations from database @2.md similarity index 100% rename from Graduation Project Documentation/Software/Create a 2d map to update robots and shelves locations from database @2.md rename to Graduation-Project-Documentation/Software/Create a 2d map to update robots and shelves locations from database @2.md diff --git a/Graduation Project Documentation/Software/Software.md b/Graduation-Project-Documentation/Software/Software.md similarity index 100% rename from Graduation Project Documentation/Software/Software.md rename to Graduation-Project-Documentation/Software/Software.md diff --git a/Graduation Project Documentation/Software/Warehouse robots-shelves movement simulation @3.md b/Graduation-Project-Documentation/Software/Warehouse robots-shelves movement simulation @3.md similarity index 100% rename from Graduation Project Documentation/Software/Warehouse robots-shelves movement simulation @3.md rename to Graduation-Project-Documentation/Software/Warehouse robots-shelves movement simulation @3.md diff --git a/Graduation Project Documentation/Software/backeend for a dashboard web application @6.md b/Graduation-Project-Documentation/Software/backeend for a dashboard web application @6.md similarity index 100% rename from Graduation Project Documentation/Software/backeend for a dashboard web application @6.md rename to Graduation-Project-Documentation/Software/backeend for a dashboard web application @6.md diff --git a/Graduation Project Documentation/Software/configure communication with raspberrypi over wifi @10.md b/Graduation-Project-Documentation/Software/configure communication with raspberrypi over wifi @10.md similarity index 100% rename from Graduation Project Documentation/Software/configure communication with raspberrypi over wifi @10.md rename to Graduation-Project-Documentation/Software/configure communication with raspberrypi over wifi @10.md diff --git a/Graduation Project Documentation/Software/frontend for a dashboard web application @5.md b/Graduation-Project-Documentation/Software/frontend for a dashboard web application @5.md similarity index 100% rename from Graduation Project Documentation/Software/frontend for a dashboard web application @5.md rename to Graduation-Project-Documentation/Software/frontend for a dashboard web application @5.md diff --git a/Graduation Project Documentation/Software/implement the 2d map in javascript-react (for later usage in web application) @4.md b/Graduation-Project-Documentation/Software/implement the 2d map in javascript-react (for later usage in web application) @4.md similarity index 100% rename from Graduation Project Documentation/Software/implement the 2d map in javascript-react (for later usage in web application) @4.md rename to Graduation-Project-Documentation/Software/implement the 2d map in javascript-react (for later usage in web application) @4.md diff --git a/Graduation Project Documentation/Software/raspbian os on raspberrypi @7.md b/Graduation-Project-Documentation/Software/raspbian os on raspberrypi @7.md similarity index 100% rename from Graduation Project Documentation/Software/raspbian os on raspberrypi @7.md rename to Graduation-Project-Documentation/Software/raspbian os on raspberrypi @7.md diff --git a/Graduation Project Documentation/Software/ros noetic on raspberrypi @26.md b/Graduation-Project-Documentation/Software/ros noetic on raspberrypi @26.md similarity index 100% rename from Graduation Project Documentation/Software/ros noetic on raspberrypi @26.md rename to Graduation-Project-Documentation/Software/ros noetic on raspberrypi @26.md diff --git a/Graduation Project Documentation/Software/stream camera over rtsp with raspberrypi @8.md b/Graduation-Project-Documentation/Software/stream camera over rtsp with raspberrypi @8.md similarity index 100% rename from Graduation Project Documentation/Software/stream camera over rtsp with raspberrypi @8.md rename to Graduation-Project-Documentation/Software/stream camera over rtsp with raspberrypi @8.md diff --git a/Graduation Project Documentation/Software/upload code to the micro-controller over wifi network @9.md b/Graduation-Project-Documentation/Software/upload code to the micro-controller over wifi network @9.md similarity index 100% rename from Graduation Project Documentation/Software/upload code to the micro-controller over wifi network @9.md rename to Graduation-Project-Documentation/Software/upload code to the micro-controller over wifi network @9.md diff --git a/Test-hardware-components/Arduino-test-code/Arduino-test-code.ino b/Test-hardware-components/Arduino-test-code/Arduino-test-code.ino new file mode 100644 index 0000000..817b1c7 --- /dev/null +++ b/Test-hardware-components/Arduino-test-code/Arduino-test-code.ino @@ -0,0 +1,66 @@ +#define motor1_dir PA0 +#define motor2_dir PA2 +#define motor1_pwm PA1 +#define motor2_pwm PA3 + +#define motor1_encoder_int1 PA5 +#define motor1_encoder_int2 PA6 + +int countA = 0, countB = 0; +int currentStateCLK; +int previousStateCLK; + +String encdir =""; +float last_time = 0, current_time = 0; +float RPM = 0; + +void setup() { + + // pinMode(motor1_dir, OUTPUT); + // pinMode(motor1_pwm, OUTPUT); + pinMode(motor1_encoder_int1,INPUT); + pinMode(motor1_encoder_int2,INPUT); + attachInterrupt(digitalPinToInterrupt(motor1_encoder_int1), fucnA,RISING); + + Serial.begin(9600); +} + +void fucnA(){ + + currentStateCLK = digitalRead(motor1_encoder_int1); + + // If the inputDT state is different than the inputCLK state then + // the encoder is rotating clockwise + if (digitalRead(motor1_encoder_int2) != currentStateCLK) { + countA ++; + encdir ="CW"; + + + } else { + // Encoder is rotating counterclockwise + countA --; + encdir ="CCW"; + + } + +} + +void loop() { + + //analogWrite(motor1_pwm, 255); + //digitalWrite(motor1_dir,HIGH); + current_time = millis(); + if ((current_time-last_time)>1000){ + RPM = (countA/230)*60; + last_time = current_time; + Serial.print("countA = "); + Serial.println(countA); + Serial.print("Dir: "); + Serial.println(encdir); + Serial.print("RPM: "); + Serial.println(RPM); + countA = 0; + + } + +} diff --git a/Test-hardware-components/README.md b/Test-hardware-components/README.md new file mode 100644 index 0000000..f41808b --- /dev/null +++ b/Test-hardware-components/README.md @@ -0,0 +1,19 @@ +> ## ***This is a documentation for issue #11*** +> `Testing hardware components using arduino ide` + +## 1. Testing the 3 Motors using cytrons 1 channel. +- We provide speed and direction control of the 2 motors using 2 cytrons 1 channel, the third motor is used for the lifting mechanism so we only need direction control. + +## 2. Getting encoders readings. +- By comparing the two sets of pulses out of the encoder we can determine the direction of the motor. +- Depending on the direction we count rising edges of the pulses by interrupt to evaluate revolution per minite. + - `RPM = ( counts / encoder resolution )*60` +- Finally, we display the readings of counts, RPM and Motor direction on a serial monitor every 1 sec. + +## 3. Testing MPU6050 on the MicroController(Stm32). +- MPU is used to rotate (90 or 180) degree (clockwise or Anticlockwise ) using the Yaw angle +- the sensor is tested + - we will make the connection like in the figure below then watch the reading , also by change the yaw angle of the sesnor the reading will change + +![BluePillMPU6050](https://user-images.githubusercontent.com/93758246/232246374-b5e06a53-7a0c-4528-87cf-b770c5909e74.png) +