This repository contains Python code to control a Sphero robot via keyboard inputs. It uses the spherov2 package for Sphero interaction and the keyboard library for key detection. The program runs in a loop, listening for key presses to move the Sphero in different directions.
- Real-time Control: Control your Sphero robot in real-time using keyboard inputs.
- Dynamic Loading: Utilizes Python's
importlibto dynamically reload control logic, making development easier. - Modular Design: Control logic is separated into a
controlsmodule for easier management and updates.
- Python 3.x
spherov2packagekeyboardlibrary
- Clone the repository.
- Install dependencies using
pip install -r requirements.txt. - Run
ex_control.pyto start the program.
- W: Move Forward
- S: Move Backward
- A: Move Left
- D: Move Right
- Q: Quit the program