https://github.com/fatihilhan42/arm_control_with_opencv
It is the robot arm control project of our Computer Vision works with Opencv. In this project, a Firebase-based robot project was realized by using Opencv and Mediapipe artificial intelligence libraries. Below I tried to explain the details of the project step by step.
https://github.com/fatihilhan42/arm_control_with_opencv
computer-vision fortytwo image-processing open-source opencv raspberry-pi raspberry-pi-3
Last synced: about 2 months ago
JSON representation
It is the robot arm control project of our Computer Vision works with Opencv. In this project, a Firebase-based robot project was realized by using Opencv and Mediapipe artificial intelligence libraries. Below I tried to explain the details of the project step by step.
- Host: GitHub
- URL: https://github.com/fatihilhan42/arm_control_with_opencv
- Owner: fatihilhan42
- Created: 2022-07-31T13:59:40.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-07-31T14:01:29.000Z (almost 4 years ago)
- Last Synced: 2025-03-23T22:48:45.997Z (over 1 year ago)
- Topics: computer-vision, fortytwo, image-processing, open-source, opencv, raspberry-pi, raspberry-pi-3
- Language: Python
- Homepage:
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Arm control with OpenCv,Mediapipe and Firebase
It is the robot arm control project of our Computer Vision works with Opencv. In this project, a Firebase-based robot project was realized by using Opencv and Mediapipe artificial intelligence libraries. Below I tried to explain the details of the project step by step.
## Arm control with OpenCv,Mediapipe and Firebase
First, we will download the libraries we will use.
```Python
import mediapipe as mp
import cv2
import numpy as np
import pyrebase
import time
```
### The code block we linked to Firebase
```Python
# içerikler - contants
ml = 150
max_x, max_y = 300 + ml, 50
curr_tool = "Arac Sec"
time_init = True
rad = 40
var_inits = False
thick = 2
prevx, prevy = 0, 0
firebaseConfig = {
"apiKey": "AIzaSyB_S2tR_2YsRrM-KQUHsS_Uj_q1kmGBetM",
"authDomain": "armrobot-98491.firebaseapp.com",
"databaseURL": "https://armrobot-98491-default-rtdb.firebaseio.com/",
"projectId": "armrobot-98491",
"storageBucket": "armrobot-98491.appspot.com",
"messagingSenderId": "755214414021",
"appId": "1:755214414021:web:8807c50e5d8b4c22bec0ac",
"measurementId": "G-YMMDCZZQ68"
};
firebase = pyrebase.initialize_app(firebaseConfig)
db = firebase.database()
size = 4
```
After registering Firebase from Google, create your project file and paste the drawn part in our code.

**NOTE**
The code block I have shown below will not be in firebase. Don't forget to add it. Don't forget to add it to the code block by typing its own link in your Firebase account where I have shown in the picture.
```Python
"databaseURL": "https://armrobot-98491-default-rtdb.firebaseio.com/",
```

**NOTE2**
Also, do not forget to name users2 and string as a variable for the firebase base you will create.

**NOTE3**
Do not forget to apply the changes you will make on the Firebase base in the raspberrypi_code part.
Raspberrypi_code.py file should be run inside Raspberry Pi development board. The other main.py should be run on computer.
Raspberry pi connection pins of robotic arm
```Python
GPIO.setup(11, GPIO.OUT)
GPIO.setup(13, GPIO.OUT)
GPIO.setup(40, GPIO.OUT)
GPIO.setup(15, GPIO.OUT)
```

Wiring of the servo motors of the robotic arm on the breadboard
