A project for working with USB oscilloscope - Android application and web interface for signal acquisition and visualization.
Oscill2 is a comprehensive solution for working with USB oscilloscopes, including:
- Android Application - native mobile interface with chart visualization via MPAndroidChart
- Web Interface - web application built with FastAPI + vanilla JS for browser access
- Communication Client - Python library for device communication via serial port
Oscill2/
├── app/ # Android application (Gradle)
│ └── src/
│ └── main/
├── web_oscill/ # Web application
│ ├── main.py # FastAPI server
│ ├── oscill_client.py # Device communication client
│ ├── device_service.py # Device management service
│ ├── converters.py # Data converters
│ └── static/ # Web interface static files
├── docs/ # Documentation
│ └── protocol/ # Communication protocols
├── scripts/ # Helper scripts
├── external/ # External libraries (MPAndroidChart)
└── requirements.txt # Python dependencies
- Connect to oscilloscope via serial port
- Real-time signal acquisition and visualization
- Parameter configuration: voltage, time, trigger, filters
- Measurements: frequency, period, Vpp, Vmax, Vmin, Vavg
- Frame history
- REST API for integration
Use the web_oscill.sh script for automatic startup:
./web_oscill.shThe script automatically:
- Checks and creates Python venv (
.venv) - Installs required dependencies
- Stops previous server instances
- Starts server at
http://127.0.0.1:8000 - Opens browser with web interface
# Create virtual environment
python3 -m venv .venv
source .venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Start server
python -m uvicorn web_oscill.main:app --host 127.0.0.1 --port 8000POST /api/connect- connect to devicePOST /api/disconnect- disconnectGET /api/status- device statusGET /api/acquire/single- acquire single framePOST /api/config- configure parametersGET /api/frames- frame historyPOST /api/acquisition/start- start data acquisitionPOST /api/acquisition/stop- stop acquisition
The Android application provides a native mobile interface for working with the oscilloscope.
./gradlew assembleDebug./gradlew installDebug- FastAPI >= 0.111.0
- Uvicorn[standard] >= 0.30.0
- PySerial >= 3.5
- NumPy >= 2.0.0
- Pydantic >= 2.8.0
- orjson >= 3.10.0
- Gradle 8.x
- Android SDK
- MPAndroidChart (included in external/)
Detailed documentation is located in the docs/ directory:
docs/project.md- general project descriptiondocs/web_app.md- web application documentationdocs/web_app_frontend.md- frontend documentationdocs/protocol/- device communication protocols
Test scripts are located in scripts/:
# Connection test
python scripts/test_connect.py
# Full oscilloscope test
python scripts/oscill_test.pyThis project uses MPAndroidChart (Apache License 2.0).
yavfast