This project allows real-time control and monitoring of a servo motor using both a graphical user interface (GUI) and a potentiometer, powered by an Arduino Nano. It also includes two LEDs that can be toggled through the GUI.
- Control servo motor using a GUI slider (0β180Β°)
- Read and sync servo angle from potentiometer
- Toggle LED1 (D3) and LED2 (D9) with buttons in the GUI
- Bidirectional communication via serial
- Automatic synchronization between GUI and potentiometer
- Live status updates on actions (LED toggle, angle updates)
- Arduino Nano
- SG90 Servo Motor
- Potentiometer (10kΞ©)
- 2x LEDs
- 2x 220Ξ© Resistors
- Jumper Wires
- Breadboard
- PC (with Python + Tkinter + pySerial)
Smart-Servo-Control-Panel/
β
βββ arduino/
β βββ SmartServo.ino
β
βββ gui/
β βββ main\_gui.py
β
βββ assets/
β βββ (images, diagrams)
β
βββ README.md
- Flash
SmartServo.inoto your Arduino Nano - Make sure the serial baud rate is
9600
pip install pyserialpython main_gui.py
β οΈ Ensure the correct COM port is selected in the GUI.
- Angle Commands: Sends integers like
90\n - LED Toggles: Sends
LED1\norLED2\n - ACK & Status: Receives
ACK:<angle>orACK:LED1
- Write Timeout: Ensure no other program is using the COM port
- "Cannot configure port": Try unplugging/replugging the Arduino, and verify correct port
- Slider not syncing: Make sure potentiometer data is mapped correctly in Arduino code
MIT License
Created by [Torikul) π