Files
solutions_season_unearthed/README.md

142 lines
4.8 KiB
Markdown
Raw Normal View History

2025-10-11 02:29:50 +00:00
# 65266 Lego Dynamics - UNEARTHED Season Robot Code
2025-08-31 15:53:36 +00:00
<div align="center">
2025-09-10 13:34:51 +00:00
2025-10-11 02:29:50 +00:00
**Competitive Robotics Code for FLL SUBMERGED℠ Season**
2025-09-10 13:34:51 +00:00
![Team](https://img.shields.io/badge/Team-65266%20Lego%20Dynamics-blue?style=for-the-badge)
![Season](https://img.shields.io/badge/Season-UNEARTHED-green?style=for-the-badge)
2025-10-11 02:29:50 +00:00
![License](https://img.shields.io/badge/License-GPLv3-red?style=for-the-badge)
2025-09-10 13:34:51 +00:00
</div>
2025-09-10 13:34:51 +00:00
---
2025-09-10 13:34:51 +00:00
2025-10-09 21:13:36 +00:00
## Project Overview
2025-09-10 13:34:51 +00:00
2025-10-28 18:06:09 +00:00
Welcome to the official code repository for **Team 65266 - Lego Dynamics**! This repository contains all the Pybricks code powering our robot through the UNEARTHED season missions. Our modular approach allows for flexible mission execution and quick color-sensor-based run selection.
2025-09-10 13:34:51 +00:00
---
2025-09-10 13:34:51 +00:00
2025-10-09 21:13:36 +00:00
## Robot Hardware
2025-10-09 12:23:15 +00:00
2025-10-09 21:13:36 +00:00
### Meet Optimus Prime III
2025-10-09 12:23:15 +00:00
| Component | Specification |
|-----------|--------------|
2025-10-09 21:13:36 +00:00
| **Robot Name** | Optimus Prime III |
| **Firmware** | Pybricks |
2025-10-28 18:06:09 +00:00
| **Attachment Motors** | 2x Large Motors (Ports C & D) |
| **Drive Motors** | 2x Small Motors (Ports A & B) |
2025-10-09 21:13:36 +00:00
| **Sensors** | Up-facing Color Sensor (Quick Start) |
| **Attachments** | Multiple mission-specific tools |
### Motor Configuration
- **Port A**: Left Drive Motor (Small)
- **Port B**: Right Drive Motor (Small)
- **Port C**: Left Attachment Motor (Large)
- **Port D**: Right Attachment Motor (Large)
---
2025-10-09 21:13:36 +00:00
## Code Structure
Our codebase is organized for maximum efficiency and modularity:
```
2025-10-09 21:13:36 +00:00
Repository
┣ run_1.py # Individual mission runs
2025-10-28 18:06:09 +00:00
┣ run_2.py
2025-10-09 21:13:36 +00:00
┣ run_3.py
┣ ...
2025-10-28 18:06:09 +00:00
┗ masterFile.py # 🎯 Combined master file with color-start logic - this changes periodically as we release new versions. Check this README if you are unsure what code should be loaded on the robot.
```
2025-10-09 21:13:36 +00:00
### Workflow
1. **Individual Run Files** → Contain specific mission sequences
2. **Script Combination** → Merges runs into master file
3. **Color Sensor Logic** → Adds intelligent run selection based on color detection
---
2025-10-09 21:13:36 +00:00
## How to Use
2025-10-28 18:06:09 +00:00
### Installation & Deployment - from the server - everyday
2025-10-28 18:06:09 +00:00
1. Download the file codes_for_scrimmage/hazmat/mainhazmatUPD.py
2025-10-28 18:22:25 +00:00
- You can do this through the repo, by using cURL, or by using git.
- Repo - Go to [codes_for_scrimmage/hazmat/mainhazmatUPD.py](codes_for_scrimmage/hazmat/mainhazmatUPD.py) and click the "Download" button.
2025-10-30 12:21:46 +00:00
- cURL or another HTTP data transferrer -
```curl -o mainhazmatUPD.py https://codes.fll-65266.org/FLL_65266_LEGO_DYNAMICS/solutions_season_unearthed/raw/branch/main/codes_for_scrimmage/hazmat/mainhazmatUPD.py```
- git CLI -
```git clone -b dev https://codes.fll-65266.org/FLL_65266_LEGO_DYNAMICS/solutions_season_unearthed.git && cd solutions_season_unearthed/codes_for_scrimmage/hazmat``` - Then use mainhazmatUPD.py.
2025-10-28 18:06:09 +00:00
2. Open https://code.pybricks.com/ and select the "Import a file" button on the top of the left bar. Import the .py file. Pair your robot via Bluetooth in Pybricks by selecting the Bluetooth button.
- Import button looks like this:
![alt text](https://codes.fll-65266.org/FLL_65266_LEGO_DYNAMICS/solutions_season_unearthed/raw/branch/do-not-merge/import.png)
- Bluetooth button looks like this:
![alt text](https://codes.fll-65266.org/FLL_65266_LEGO_DYNAMICS/solutions_season_unearthed/raw/branch/do-not-merge/bluetooth.png)
2025-10-28 18:11:19 +00:00
3. **Upload to Robot** - Click "Download and Run" or send the program to the robot
- Run button looks like this: ![alt text](https://codes.fll-65266.org/FLL_65266_LEGO_DYNAMICS/solutions_season_unearthed/raw/branch/do-not-merge/run.png)
2025-10-09 21:13:36 +00:00
4. **Start Your Run**
2025-10-28 18:11:19 +00:00
- If starting without Pybricks, press the center circular button on the SPIKE Prime Hub to start the program.
- Hold a colored LEGO brick up to the color sensor.
- Different colors trigger different mission runs - color mapping is below.
2025-10-09 21:13:36 +00:00
### Color Start System
2025-10-28 18:06:09 +00:00
| Color | Mission |
|-------|-----------|
| Green 🟩 | Run 1 |
| Purple 🟪 | Run 2 |
| Red 🟥| Run 3 |
| Yellow 🟨| Run 4 |
| Blue 🟦| Run 5 |
| Orange 🟧| Run 6 |
---
2025-10-09 21:13:36 +00:00
## Competition Notes
2025-10-11 02:29:50 +00:00
- **Quick Start**: Color sensor enables rapid run switching without reprogramming
- **Modular Design**: Easy to test and modify individual missions
- **Flexible Attachments**: Multiple tools optimized for different challenges
---
2025-10-09 21:13:36 +00:00
## Contributing
Team members can contribute by:
2025-10-11 02:29:50 +00:00
- Reporting bugs via Issues
- Suggesting mission optimizations
- Testing new attachment designs
- Documenting successful strategies
---
2025-10-09 21:13:36 +00:00
## License
**GNU General Public License v3.0**
2025-10-09 21:13:36 +00:00
You can take inspiration from our code, but you can't take our exact code.
This project is licensed under GPL-3.0 - see the [LICENSE](LICENSE) file for complete details.
2025-10-09 21:13:36 +00:00
### What This Means:
- Learn from our approaches and strategies
- Understand our logic and algorithms
- Don't copy-paste our exact code
- Create your own unique implementations
---
2025-10-09 21:13:36 +00:00
## Contact & Support
2025-10-28 18:06:09 +00:00
**Team 65266 - Lego Dynamics**
Questions about our approach? Interested in collaboration? Reach out!
2025-10-28 18:06:09 +00:00
---