|
|
před 1 rokem | |
|---|---|---|
| .github | před 1 rokem | |
| arduino_code | před 1 rokem | |
| arduino_code_TMC2209 | před 1 rokem | |
| esp32 | před 1 rokem | |
| patterns | před 1 rokem | |
| static | před 1 rokem | |
| steps_calibration | před 1 rokem | |
| templates | před 1 rokem | |
| .gitignore | před 1 rokem | |
| CHANGELOG.md | před 1 rokem | |
| Dockerfile | před 1 rokem | |
| README.md | před 1 rokem | |
| app.py | před 1 rokem | |
| docker-compose.yml | před 1 rokem | |
| mirror_pattern.py | před 1 rokem | |
| requirements.txt | před 1 rokem |
Dune Weaver is a project for a mesmerizing, motorized sand table that draws intricate patterns in sand using a steel ball moved by a magnet. This project combines hardware and software, leveraging an Arduino for hardware control and a Python/Flask-based web interface for interaction.
Clone the repository:
git clone https://github.com/tuanchris/dune-weaver.git
cd dune-weaver
Install the required Python libraries:
pip install -r requirements.txt
Set up your Arduino: • Flash the Arduino with the provided firmware to handle serial commands. • Connect the Arduino to your computer.
Run the Flask server:
python app.py
Access the web interface: Open your browser and navigate to http://localhost:8080.
• Patterns: Save .thr files (theta-rho coordinate files) in the patterns/ directory. • Uploads: Upload patterns via the web interface.
Each pattern file consists of lines with theta and rho values (in degrees and normalized units, respectively), separated by a space. Comments start with #.
Example:
# Example pattern
0 0.5
90 0.7
180 0.5
270 0.7
The project exposes RESTful APIs for various actions. Here are some key endpoints: • List Serial Ports: /list_serial_ports (GET) • Connect to Serial: /connect_serial (POST) • Upload Pattern: /upload_theta_rho (POST) • Run Pattern: /run_theta_rho (POST) • Stop Execution: /stop_execution (POST)
dune-weaver/
├── app.py # Flask app and core logic
├── patterns/ # Directory for theta-rho files
├── static/ # Static files (CSS, JS)
├── templates/ # HTML templates for the web interface
├── README.md # Project documentation
├── requirements.txt # Python dependencies
└── arduino/ # Arduino firmware
Happy sand drawing with Dune Weaver! 🌟