|
| 1 | +# OGScope Quick Start Guide |
| 2 | + |
| 3 | +This guide will help you quickly set up the OGScope development environment. |
| 4 | + |
| 5 | +English | [中文](QUICK_START.md) |
| 6 | + |
| 7 | +## 🎯 Goals |
| 8 | + |
| 9 | +- ✅ Run OGScope on Orange Pi Zero 2W |
| 10 | +- ✅ Configure PyCharm Professional remote development |
| 11 | +- ✅ Access the system through web interface |
| 12 | + |
| 13 | +## 📋 Prerequisites |
| 14 | + |
| 15 | +### Hardware Requirements |
| 16 | + |
| 17 | +- Orange Pi Zero 2W development board |
| 18 | +- IMX327 camera module |
| 19 | +- 2.4" SPI LCD display |
| 20 | +- MicroSD card (32GB+) |
| 21 | +- Power supply (5V/2A) |
| 22 | + |
| 23 | +### Software Requirements |
| 24 | + |
| 25 | +- macOS/Windows/Linux development machine |
| 26 | +- PyCharm Professional 2025 |
| 27 | +- Python 3.9+ |
| 28 | +- Poetry package manager |
| 29 | + |
| 30 | +## 🚀 Installation Steps |
| 31 | + |
| 32 | +### Step 1: Prepare Orange Pi Zero 2W |
| 33 | + |
| 34 | +1. **Flash the OS** |
| 35 | + ```bash |
| 36 | + # Download Ubuntu/Debian image for Orange Pi Zero 2W |
| 37 | + # Flash to microSD card using balenaEtcher |
| 38 | + ``` |
| 39 | + |
| 40 | +2. **Initial Setup** |
| 41 | + ```bash |
| 42 | + # Boot the board and connect via SSH |
| 43 | + ssh pi@orangepi.local |
| 44 | + |
| 45 | + # Update system |
| 46 | + sudo apt update && sudo apt upgrade -y |
| 47 | + |
| 48 | + # Install essential packages |
| 49 | + sudo apt install -y python3.9 python3-pip python3-venv git |
| 50 | + ``` |
| 51 | + |
| 52 | +3. **Install Poetry** |
| 53 | + ```bash |
| 54 | + curl -sSL https://install.python-poetry.org | python3 - |
| 55 | + echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc |
| 56 | + source ~/.bashrc |
| 57 | + ``` |
| 58 | + |
| 59 | +### Step 2: Clone and Setup Project |
| 60 | + |
| 61 | +```bash |
| 62 | +# Clone the repository |
| 63 | +git clone https://github.com/OG-star-tech/OGScope.git |
| 64 | +cd OGScope |
| 65 | + |
| 66 | +# Install dependencies |
| 67 | +poetry install |
| 68 | + |
| 69 | +# Activate virtual environment |
| 70 | +poetry shell |
| 71 | +``` |
| 72 | + |
| 73 | +### Step 3: Configure PyCharm |
| 74 | + |
| 75 | +1. **Open Project** |
| 76 | + - Launch PyCharm Professional |
| 77 | + - Open the OGScope project directory |
| 78 | + |
| 79 | +2. **Configure File Sync** |
| 80 | + - Go to `Tools` → `Deployment` → `Configuration` |
| 81 | + - Add SFTP server for Orange Pi Zero 2W |
| 82 | + - Configure automatic file synchronization |
| 83 | + |
| 84 | +3. **Setup Run Configurations** |
| 85 | + - Create local run configuration for development |
| 86 | + - Create remote run configuration for hardware testing |
| 87 | + |
| 88 | +### Step 4: Run the Application |
| 89 | + |
| 90 | +```bash |
| 91 | +# Local development |
| 92 | +python -m ogscope.main |
| 93 | + |
| 94 | +# Remote testing (on Orange Pi) |
| 95 | +ssh orangepi |
| 96 | +cd /home/pi/OGScope |
| 97 | +poetry run python -m ogscope.main |
| 98 | +``` |
| 99 | + |
| 100 | +## 🌐 Access Web Interface |
| 101 | + |
| 102 | +After starting the application, access: |
| 103 | +- Local: http://localhost:8000 |
| 104 | +- Remote: http://orangepi.local:8000 |
| 105 | + |
| 106 | +## 🔧 Development Workflow |
| 107 | + |
| 108 | +1. **Local Development** |
| 109 | + - Write code in PyCharm |
| 110 | + - Test basic functionality locally |
| 111 | + - Use local run configuration |
| 112 | + |
| 113 | +2. **File Synchronization** |
| 114 | + - Files automatically sync to Orange Pi |
| 115 | + - Manual sync when needed |
| 116 | + |
| 117 | +3. **Hardware Testing** |
| 118 | + - Switch to remote run configuration |
| 119 | + - Test camera and hardware features |
| 120 | + - Debug on actual hardware |
| 121 | + |
| 122 | +## 📚 Next Steps |
| 123 | + |
| 124 | +- Read [Development Guide](development/README.md) |
| 125 | +- Check [PyCharm Remote Development](development/pycharm-remote.md) |
| 126 | +- Explore [API Documentation](API_ARCHITECTURE.md) |
| 127 | + |
| 128 | +## 🆘 Troubleshooting |
| 129 | + |
| 130 | +### Common Issues |
| 131 | + |
| 132 | +1. **Connection Problems** |
| 133 | + ```bash |
| 134 | + # Check network connectivity |
| 135 | + ping orangepi.local |
| 136 | + |
| 137 | + # Verify SSH connection |
| 138 | + ssh orangepi |
| 139 | + ``` |
| 140 | + |
| 141 | +2. **Permission Issues** |
| 142 | + ```bash |
| 143 | + # Fix camera permissions |
| 144 | + sudo usermod -a -G video pi |
| 145 | + sudo reboot |
| 146 | + ``` |
| 147 | + |
| 148 | +3. **Dependency Issues** |
| 149 | + ```bash |
| 150 | + # Reinstall dependencies |
| 151 | + poetry install --sync |
| 152 | + ``` |
| 153 | + |
| 154 | +## 📞 Support |
| 155 | + |
| 156 | +- [GitHub Issues](https://github.com/OG-star-tech/OGScope/issues) |
| 157 | +- [Discussions](https://github.com/OG-star-tech/OGScope/discussions) |
| 158 | +- [Documentation](README.md) |
0 commit comments