The main idea is that with using Atmega128 and Python Server, search and locate colored marble using camera and rotate the servo motor, enable Electromagnet so as to catch the marble.
The Python server is used to locate the marble using Hough Transform and identify its color using K-Means Clustering Algorithm.
Atmega128 and Python Sever Communicates via Bluetooth(HC-04).






Main board with Atmega128 is prepared by the lab so images are not uploaded to this git.





Used 6 sensors with filtering: Pressure Sensor, Thermister Sensor, CdS Sensor, PSD Sensor, Fire Detection Sensor, Vibration Detecting Sensor
i) Pressure Sensor: Used IIR Low Filter(Butterworth).
ii) Thermister Sensor: Used Low Pass Filter.
iii) CdS Sensor: Used IIR Low Filter(Butterworth).
iv) PSD Sensor: Used IIR Low Filter(Butterworth).
v) Fire Detection Sensor: Used FIR Low Filter(Butterworth).
vi) Vibration Detecting Sensor: Used IIR High Filter(Butterworth).
Atmega128 and Python Server Communicates using Bluetooth. On the Server, User need to press "Bluetooth Connect" in order to connect with HC-04. HC-04 setup must be preceded.
When pressed "Demo", K-Means Clustering Algorithm runs and shows in the far left image placeholder. When Pressed "Camera On", Camera connected to the computer is shown in the far right image place holder. When command arrives from Atmega128, System captures image from the camera and finds the marble using Hough Transform with OpenCV2. Then Evaluation of its color is run with K-Means Clustering Algorithm and the results are returned to Atemga128.

