Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6c028a0

Browse files
committed
readme check pt before final edit
1 parent5a69f80 commit6c028a0

File tree

1 file changed

+18
-125
lines changed

1 file changed

+18
-125
lines changed

‎tsapython/README.md‎

Lines changed: 18 additions & 125 deletions
Original file line numberDiff line numberDiff line change
@@ -2,163 +2,56 @@
22

33
**An Unofficial Python API for the tinySA Device Series**
44

5-
A Non-GUI Python API for the tinySA series of spectrum analyzer devices. This library provides programmatic control over tinySA devices for automated measurements, data collection, and analysis.
5+
A Non-GUI Python API for the tinySA series of spectrum analyzer devices. This library provides programmatic control over tinySA devices for automated measurements, data collection, and analysis.
66

7-
[![PyPI version](https://badge.fury.io/py/tsapython.svg)](https://badge.fury.io/py/tsapython)
8-
[![License: GPL v2](https://img.shields.io/badge/License-GPL_v2-blue.svg)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
9-
10-
>**Note**: This repository uses official resources and documentation but is NOT endorsed by the official tinySA product, owner, or company. Refer to official resources and support for product information.
11-
12-
##Quick Start
13-
14-
###Installation
15-
16-
```bash
17-
pip install tsapython
18-
```
19-
20-
###Basic Usage
21-
22-
```python
23-
from tsapythonimport TinySA
7+
Popular features:
248

25-
# Create and connect to device
26-
tsa= TinySA()
27-
tsa.set_verbose(True)
28-
tsa.set_error_byte_return(True)
9+
-**Device Discovery**: Automatic detection and serial connection to tinySA devices
10+
-**Frequency Sweeps**: Collect data across specified frequency ranges
11+
-**Multiple Modes**: Support for both input and output modes (device dependent)
12+
-**Data Export**: Easy integration with matplotlib, pandas, and numpy
13+
-**Error Handling**: Error checking and verbose output options
14+
-**Device Control**: Full programmatic control of tinySA settings and measurements
2915

30-
# Attempt to connect
31-
found, connected= tsa.autoconnect()
3216

33-
if connected:
34-
print("Device connected!")
35-
36-
# Get device info
37-
device_id= tsa.get_device_id()
38-
print(f"Device ID:{device_id}")
39-
40-
# Collect frequency sweep data
41-
start_freq=100e6# 100 MHz
42-
stop_freq=500e6# 500 MHz
43-
n_pts=101
44-
45-
tsa.pause()
46-
freq_vals= tsa.hop(start_freq, stop_freq, n_pts,1)# Get frequencies
47-
power_vals= tsa.hop(start_freq, stop_freq, n_pts,2)# Get power data
48-
49-
tsa.disconnect()
50-
print("Data collection complete!")
51-
else:
52-
print("Could not connect to device")
53-
```
17+
This repository uses official resources and documentation but is**NOT** endorsed by the official tinySA product, owner, or company. Refer to official resources and support for product information. This library was built for the official tinySA device line(s), so any knock-off or custom devices may not be compatible with the library. Unofficial devices have not been tested.
5418

55-
###Plotting Example
5619

57-
```python
58-
import matplotlib.pyplotas plt
5920

60-
# Convert data for plotting
61-
x_val= [float(x)for xin freq_vals.decode('utf-8').split()]
62-
y_val= [float(x)for xin power_vals.decode('utf-8').split()]
21+
[![PyPI version](https://badge.fury.io/py/tsapython.svg)](https://badge.fury.io/py/tsapython)
22+
[![License: GPL v2](https://img.shields.io/badge/License-GPL_v2-blue.svg)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
6323

64-
# Create plot
65-
plt.plot(x_val, y_val)
66-
plt.xlabel("Frequency (Hz)")
67-
plt.ylabel("Power (dBm)")
68-
plt.title("tinySA Frequency Sweep")
69-
plt.show()
70-
```
7124

72-
###Full Code Examples:
25+
##Full Code Examples:
7326

74-
Examples are provided for all of the following:
27+
The README on the[main GitHub repo](https://github.com/LC-Linkous/tinySA_python) has provides examples for all of the following:
7528

7629
* Direct device interfacing and control
7730
* Realtime and static waterfall plots
7831
* Exporting data to CSV files
7932
* Plotting live scan data
8033

81-
##Features
82-
83-
-**Device Discovery**: Automatic detection and connection to tinySA devices
84-
-**Frequency Sweeps**: Collect data across specified frequency ranges
85-
-**Multiple Modes**: Support for both input and output modes
86-
-**Data Export**: Easy integration with matplotlib, pandas, and numpy
87-
-**Error Handling**: Error checking and verbose output options
88-
-**Device Control**: Full programmatic control of tinySA settings and measurements
89-
9034
##Supported Devices
9135

9236
- tinySA Basic
9337
- tinySA Ultra
9438
- (other devices pending testing)
9539

96-
##Core Functions
97-
Sample functions for device operation. See[GitHub](https://github.com/LC-Linkous/tinySA_python) for more examples.
98-
###Connection Management
99-
-`autoconnect()` - Automatic device discovery and connection
100-
-`disconnect()` - Clean disconnection from device
101-
102-
###Data Collection
103-
-`hop(start, stop, points, outmask)` - Collect measurement data over frequency range
104-
-`scan(start, stop, points, outmask)` - Perform frequency scans
105-
-`data()` - Get trace data from device screen
106-
-`capture()` - Requests a screen dump to be sent in binary format of HEIGHTxWIDTH pixels of each 2 bytes
107-
108-
###Device Control
109-
-`pause()` /`resume()` - Control measurement sweeps
110-
-`set_marker_color(ID, RGB24color)` - Sets colors of traces
111-
-`marker_on(ID)` / marker_off(ID)` - Turn marker on or off
112-
-`restart_device()` - reset the device
113-
114-
###Configuration
115-
-`set_verbose(enabled)` - Enable/disable detailed output
116-
-`get_device_id()` /`set_device_id(id)` - Device identification
117-
-`info()` - Get device firmware and hardware information
118-
119-
##Requirements
120-
121-
- Python 3.8+
122-
- numpy
123-
- pandas
124-
- matplotlib
125-
12640
##Documentation & Examples
12741

12842
For comprehensive documentation, advanced examples, and troubleshooting:
12943

130-
-**GitHub Repository**:[https://github.com/yourusername/tsapython](https://github.com/yourusername/tsapython)
131-
-**Official tinySA Documentation**:[https://tinysa.org/wiki/](https://tinysa.org/wiki/)
132-
133-
##Device Connection Tips
44+
-**Library GitHub Repository**:[https://github.com/LC-Linkous/tinySA_python/](https://github.com/LC-Linkous/tinySA_python/)
45+
-**Official tinySA Documentation**:[https://tinysa.org/wiki/](https://tinysa.org/wiki/), not associated with this library
13446

135-
1.**Windows**: Check Device Manager for COM port
136-
2.**Linux**: Look for`/dev/ttyACM0` or similar, may need permissions:`sudo chmod a+rw /dev/ttyACM0`
137-
3.**Multiple Devices**: Library will connect to first device found
138-
139-
##Error Handling
140-
141-
```python
142-
try:
143-
found, connected= tsa.autoconnect()
144-
ifnot connected:
145-
print("No device found")
146-
return
147-
148-
# Your measurement code here
149-
150-
exceptExceptionas e:
151-
print(f"Error:{e}")
152-
finally:
153-
tsa.disconnect()
154-
```
15547

15648
##Contributing
15749

15850
This is an unofficial community project. Contributions welcome!
15951

16052
- Report bugs and request features on[GitHub](https://github.com/LC-Linkous/tinySA_python)
161-
- Check the official tinySA community at[https://groups.io/g/tinysa](https://groups.io/g/tinysa)
53+
54+
- For device information and OFFICIAL resources, check the official tinySA community at[https://groups.io/g/tinysa](https://groups.io/g/tinysa)
16255
- Please do NOT request features or report bugs on the official community! This is an unofficial project and they do not maintain it.
16356

16457
##License
@@ -172,7 +65,7 @@ The licensing of this software does NOT take priority over the official releases
17265

17366
- tinySA device creators and community, who have created an awesome device
17467
- Official tinySA documentation and resources, especiallywww.tinysa.org/wiki/
175-
- All contributors to this library, including those who have contributed code and reached out with questions.
68+
- All contributors to this library, including those who have contributed code and reached out with questions
17669

17770
---
17871

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp