initial commit
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,2 @@
|
|||||||
|
#Mon Aug 10 19:41:11 KST 2026
|
||||||
|
gradle.version=9.3.1
|
||||||
Generated
+3
@@ -0,0 +1,3 @@
|
|||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
Generated
+6
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="AndroidProjectSystem">
|
||||||
|
<option name="providerId" value="com.android.tools.idea.GradleProjectSystem" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
Generated
+6
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="CompilerConfiguration">
|
||||||
|
<bytecodeTargetLevel target="25" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
Generated
+17
@@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="GradleSettings">
|
||||||
|
<option name="linkedExternalProjectsSettings">
|
||||||
|
<GradleProjectSettings>
|
||||||
|
<option name="testRunner" value="CHOOSE_PER_TEST" />
|
||||||
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||||
|
<option name="modules">
|
||||||
|
<set>
|
||||||
|
<option value="$PROJECT_DIR$" />
|
||||||
|
<option value="$PROJECT_DIR$/app" />
|
||||||
|
</set>
|
||||||
|
</option>
|
||||||
|
</GradleProjectSettings>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
Generated
+8
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="MarkdownSettings">
|
||||||
|
<option name="previewPanelProviderInfo">
|
||||||
|
<ProviderInfo name="Compose (experimental)" className="com.intellij.markdown.compose.preview.ComposePanelProvider" />
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
Generated
+8
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||||
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_25" project-jdk-name="jbr-25" project-jdk-type="JavaSDK" />
|
||||||
|
<component name="ProjectType">
|
||||||
|
<option name="id" value="Android" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
Generated
+17
@@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="RunConfigurationProducerService">
|
||||||
|
<option name="ignoredProducers">
|
||||||
|
<set>
|
||||||
|
<option value="com.intellij.execution.junit.AbstractAllInDirectoryConfigurationProducer" />
|
||||||
|
<option value="com.intellij.execution.junit.AllInPackageConfigurationProducer" />
|
||||||
|
<option value="com.intellij.execution.junit.PatternConfigurationProducer" />
|
||||||
|
<option value="com.intellij.execution.junit.TestInClassConfigurationProducer" />
|
||||||
|
<option value="com.intellij.execution.junit.UniqueIdConfigurationProducer" />
|
||||||
|
<option value="com.intellij.execution.junit.testDiscovery.JUnitTestDiscoveryConfigurationProducer" />
|
||||||
|
<option value="org.jetbrains.kotlin.idea.junit.KotlinJUnitRunConfigurationProducer" />
|
||||||
|
<option value="org.jetbrains.kotlin.idea.junit.KotlinPatternConfigurationProducer" />
|
||||||
|
</set>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
Generated
+6
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,157 @@
|
|||||||
|
# 🎭 StageControl - 연극 공연용 블루투스 음성 제어 앱
|
||||||
|
|
||||||
|
연극 공연 현장에서 배우가 음성 명령으로 아두이노 소품을 제어하는 Android 앱입니다.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 📁 프로젝트 구조
|
||||||
|
|
||||||
|
```
|
||||||
|
StageControl/
|
||||||
|
├── app/
|
||||||
|
│ ├── src/main/
|
||||||
|
│ │ ├── java/com/stage/control/
|
||||||
|
│ │ │ ├── MainActivity.java # 메인 화면 + 블루투스 + 음성인식
|
||||||
|
│ │ │ └── DeviceListActivity.java # 블루투스 장치 목록 선택
|
||||||
|
│ │ ├── res/
|
||||||
|
│ │ │ ├── layout/
|
||||||
|
│ │ │ │ ├── activity_main.xml # 메인 UI
|
||||||
|
│ │ │ │ └── activity_device_list.xml
|
||||||
|
│ │ │ ├── values/
|
||||||
|
│ │ │ │ ├── colors.xml # 어두운 무대 테마 색상
|
||||||
|
│ │ │ │ ├── strings.xml
|
||||||
|
│ │ │ │ └── themes.xml
|
||||||
|
│ │ │ └── drawable/
|
||||||
|
│ │ │ └── card_bg.xml # 카드 배경 모양
|
||||||
|
│ │ └── AndroidManifest.xml
|
||||||
|
│ └── build.gradle
|
||||||
|
├── build.gradle
|
||||||
|
├── settings.gradle
|
||||||
|
└── arduino/
|
||||||
|
└── StageControl.ino # 아두이노 수신 코드
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🚀 빌드 방법
|
||||||
|
|
||||||
|
### 요구사항
|
||||||
|
- Android Studio Hedgehog (2023.1) 이상
|
||||||
|
- Android SDK 34
|
||||||
|
- JDK 8 이상
|
||||||
|
|
||||||
|
### 빌드 단계
|
||||||
|
|
||||||
|
1. **Android Studio에서 프로젝트 열기**
|
||||||
|
```
|
||||||
|
File → Open → StageControl 폴더 선택
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **Gradle Sync**
|
||||||
|
```
|
||||||
|
File → Sync Project with Gradle Files
|
||||||
|
```
|
||||||
|
|
||||||
|
3. **앱 빌드 및 설치**
|
||||||
|
```
|
||||||
|
Run → Run 'app'
|
||||||
|
```
|
||||||
|
또는 APK 생성:
|
||||||
|
```
|
||||||
|
Build → Build Bundle(s)/APK(s) → Build APK(s)
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 📱 앱 사용 방법
|
||||||
|
|
||||||
|
### 1. HC-05 블루투스 페어링 (먼저 해야 함)
|
||||||
|
1. 안드로이드 설정 → 블루투스
|
||||||
|
2. HC-05 장치 페어링 (기본 PIN: `1234` 또는 `0000`)
|
||||||
|
|
||||||
|
### 2. 앱 실행 흐름
|
||||||
|
```
|
||||||
|
앱 실행
|
||||||
|
→ [블루투스 연결] 버튼 클릭
|
||||||
|
→ HC-05 장치 선택
|
||||||
|
→ 연결 완료 (Connected: HC-05)
|
||||||
|
→ [🎤 음성 명령] 버튼 클릭
|
||||||
|
→ 명령 말하기
|
||||||
|
→ 아두이노로 명령 전송
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🎙 지원 음성 명령
|
||||||
|
|
||||||
|
| 말하는 내용 | 전송 명령 | 설명 |
|
||||||
|
|---|---|---|
|
||||||
|
| "동작 1" / "동작1" / "1번" | `1` | 첫 번째 동작 |
|
||||||
|
| "동작 2" / "동작2" / "2번" | `2` | 두 번째 동작 |
|
||||||
|
| "정지" / "stop" / "스톱" | `S` | 정지 |
|
||||||
|
| "홈" / "home" / "처음" | `H` | 홈 위치 복귀 |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🔌 아두이노 연결
|
||||||
|
|
||||||
|
### HC-05 배선
|
||||||
|
```
|
||||||
|
Arduino Uno HC-05
|
||||||
|
─────────────────────────
|
||||||
|
5V → VCC
|
||||||
|
GND → GND
|
||||||
|
Pin 10 (RX) → TX
|
||||||
|
Pin 11 (TX) → RX (전압분배 필요: 1kΩ + 2kΩ)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Arduino IDE 업로드
|
||||||
|
1. `arduino/StageControl.ino` 열기
|
||||||
|
2. 보드: Arduino Uno 선택
|
||||||
|
3. 포트 선택 후 업로드
|
||||||
|
4. HC-05 연결 후 시리얼 모니터(9600 baud)로 확인
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🎨 UI 디자인
|
||||||
|
|
||||||
|
- **배경**: 거의 검정 (`#0D0D0D`) - 무대 어두운 환경 최적화
|
||||||
|
- **텍스트**: 큰 흰색 글씨 - 멀리서도 확인 가능
|
||||||
|
- **상태 색상**:
|
||||||
|
- 🟢 연결됨: 초록색
|
||||||
|
- 🟡 연결 중: 노란색
|
||||||
|
- 🔴 미연결: 빨간색
|
||||||
|
- **전송 명령**: 초록 대형 텍스트 (60sp) - 즉시 확인 가능
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🔒 필요 권한
|
||||||
|
|
||||||
|
| 권한 | 용도 |
|
||||||
|
|---|---|
|
||||||
|
| BLUETOOTH / BLUETOOTH_ADMIN | 블루투스 기본 (Android 10) |
|
||||||
|
| BLUETOOTH_CONNECT / BLUETOOTH_SCAN | 블루투스 (Android 12+) |
|
||||||
|
| ACCESS_FINE_LOCATION | 블루투스 스캔 (Android 10-11) |
|
||||||
|
| RECORD_AUDIO | 음성 인식 |
|
||||||
|
| INTERNET | Google 음성 인식 API |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## ⚠️ 문제 해결
|
||||||
|
|
||||||
|
| 증상 | 해결 방법 |
|
||||||
|
|---|---|
|
||||||
|
| 장치 목록이 비어 있음 | 설정에서 HC-05 먼저 페어링 |
|
||||||
|
| 연결 실패 | HC-05 전원 확인, PIN 재입력 |
|
||||||
|
| 음성 인식 불가 | 인터넷 연결 확인, 마이크 권한 허용 |
|
||||||
|
| 명령이 아두이노에 안 들어감 | HC-05 baud rate 확인 (9600) |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 📋 개발 환경
|
||||||
|
|
||||||
|
- **언어**: Java
|
||||||
|
- **최소 SDK**: Android 10 (API 29)
|
||||||
|
- **타겟 SDK**: Android 14 (API 34)
|
||||||
|
- **블루투스**: Classic SPP (UUID: 00001101-...)
|
||||||
|
- **음성 인식**: Android SpeechRecognizer (Google)
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
apply plugin: 'com.android.application'
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace 'com.stage.control'
|
||||||
|
compileSdk 34
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
applicationId "com.stage.control"
|
||||||
|
minSdk 29
|
||||||
|
targetSdk 34
|
||||||
|
versionCode 1
|
||||||
|
versionName "1.0"
|
||||||
|
}
|
||||||
|
|
||||||
|
buildTypes {
|
||||||
|
release {
|
||||||
|
minifyEnabled false
|
||||||
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility JavaVersion.VERSION_17
|
||||||
|
targetCompatibility JavaVersion.VERSION_17
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation 'androidx.appcompat:appcompat:1.6.1'
|
||||||
|
implementation 'com.google.android.material:material:1.9.0'
|
||||||
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||||
|
|
||||||
|
// Gemini AI SDK
|
||||||
|
implementation 'com.google.ai.client.generativeai:generativeai:0.9.0'
|
||||||
|
|
||||||
|
// HTTP Client & JSON Parsing for DeepSeek
|
||||||
|
implementation 'com.squareup.okhttp3:okhttp:4.12.0'
|
||||||
|
implementation 'com.google.code.gson:gson:2.10.1'
|
||||||
|
|
||||||
|
// Guava (used in existing code for callbacks/futures)
|
||||||
|
implementation 'com.google.guava:guava:33.0.0-android'
|
||||||
|
}
|
||||||
+8
@@ -0,0 +1,8 @@
|
|||||||
|
com.stage.control.app-pngs-0 /Users/jbmulb/OpenCloud/Personal/Project/Competition/OM_china/StageControl/app/build/generated/res/pngs/debug
|
||||||
|
com.stage.control.app-resValues-1 /Users/jbmulb/OpenCloud/Personal/Project/Competition/OM_china/StageControl/app/build/generated/res/resValues/debug
|
||||||
|
com.stage.control.app-updated_navigation_xml-2 /Users/jbmulb/OpenCloud/Personal/Project/Competition/OM_china/StageControl/app/build/generated/updated_navigation_xml/debug
|
||||||
|
com.stage.control.app-packageDebugResources-3 /Users/jbmulb/OpenCloud/Personal/Project/Competition/OM_china/StageControl/app/build/intermediates/incremental/debug/packageDebugResources/merged.dir
|
||||||
|
com.stage.control.app-packageDebugResources-4 /Users/jbmulb/OpenCloud/Personal/Project/Competition/OM_china/StageControl/app/build/intermediates/incremental/debug/packageDebugResources/stripped.dir
|
||||||
|
com.stage.control.app-debug-5 /Users/jbmulb/OpenCloud/Personal/Project/Competition/OM_china/StageControl/app/build/intermediates/merged_res/debug/mergeDebugResources
|
||||||
|
com.stage.control.app-debug-6 /Users/jbmulb/OpenCloud/Personal/Project/Competition/OM_china/StageControl/app/src/debug/res
|
||||||
|
com.stage.control.app-main-7 /Users/jbmulb/OpenCloud/Personal/Project/Competition/OM_china/StageControl/app/src/main/res
|
||||||
+5
@@ -0,0 +1,5 @@
|
|||||||
|
com.stage.control.test.app-androidTest-0 /Users/jbmulb/Downloads/StageControl/app/build/generated/res/resValues/androidTest/debug
|
||||||
|
com.stage.control.test.app-updated_navigation_xml-1 /Users/jbmulb/Downloads/StageControl/app/build/generated/updated_navigation_xml/debugAndroidTest
|
||||||
|
com.stage.control.test.app-mergeDebugAndroidTestResources-2 /Users/jbmulb/Downloads/StageControl/app/build/intermediates/incremental/debugAndroidTest/mergeDebugAndroidTestResources/merged.dir
|
||||||
|
com.stage.control.test.app-mergeDebugAndroidTestResources-3 /Users/jbmulb/Downloads/StageControl/app/build/intermediates/incremental/debugAndroidTest/mergeDebugAndroidTestResources/stripped.dir
|
||||||
|
com.stage.control.test.app-debugAndroidTest-4 /Users/jbmulb/Downloads/StageControl/app/build/intermediates/merged_res/debugAndroidTest/mergeDebugAndroidTestResources
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{}
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
{}
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
{}
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
{}
|
||||||
Binary file not shown.
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"version": 3,
|
||||||
|
"artifactType": {
|
||||||
|
"type": "APK",
|
||||||
|
"kind": "Directory"
|
||||||
|
},
|
||||||
|
"applicationId": "com.stage.control",
|
||||||
|
"variantName": "debug",
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"type": "SINGLE",
|
||||||
|
"filters": [],
|
||||||
|
"attributes": [],
|
||||||
|
"versionCode": 1,
|
||||||
|
"versionName": "1.0",
|
||||||
|
"outputFile": "app-debug.apk"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"elementType": "File",
|
||||||
|
"minSdkVersionForDexing": 29
|
||||||
|
}
|
||||||
+2
@@ -0,0 +1,2 @@
|
|||||||
|
#- File Locator -
|
||||||
|
listingFile=../../../apk/debug/output-metadata.json
|
||||||
+2
@@ -0,0 +1,2 @@
|
|||||||
|
#- File Locator -
|
||||||
|
listingFile=../../../../outputs/apk/androidTest/debug/output-metadata.json
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
appMetadataVersion=1.1
|
||||||
|
androidGradlePluginVersion=8.1.4
|
||||||
+2
@@ -0,0 +1,2 @@
|
|||||||
|
appMetadataVersion=1.1
|
||||||
|
androidGradlePluginVersion=9.1.0
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"version": 3,
|
||||||
|
"artifactType": {
|
||||||
|
"type": "COMPATIBLE_SCREEN_MANIFEST",
|
||||||
|
"kind": "Directory"
|
||||||
|
},
|
||||||
|
"applicationId": "com.stage.control",
|
||||||
|
"variantName": "debug",
|
||||||
|
"elements": []
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"version": 3,
|
||||||
|
"artifactType": {
|
||||||
|
"type": "COMPATIBLE_SCREEN_MANIFEST",
|
||||||
|
"kind": "Directory"
|
||||||
|
},
|
||||||
|
"applicationId": "com.stage.control",
|
||||||
|
"variantName": "debug",
|
||||||
|
"elements": []
|
||||||
|
}
|
||||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
@@ -0,0 +1 @@
|
|||||||
|
4
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
4
|
||||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user