„README.md“ ändern

This commit is contained in:
Michael Clemens 2021-11-12 09:59:11 +01:00
parent 54de7a153f
commit 1187f330c6
1 changed files with 12 additions and 12 deletions

View File

@ -11,18 +11,18 @@ You need a computer connected to the Hardrock-50 via USB, e.g. a Raspberry Pi. T
Download all files and copy them into a directory on your raspberry pi. alternatively, you can clone the git repository as follows:
'''
```
micha@rpi:~ git clone https://git.qrz.is/clemens/hr50-api.git
'''
```
# Configuration
Open the file _hr50api.py_ and adapt the following lines to your environment:
'''
```
serial_port = '/dev/ttyUSB0'
baud = 19200
'''
```
# Execution
@ -30,10 +30,10 @@ Executing this script will spawn a web server running on port 5000. This is not
Run it as follows:
'''
```
micha@rpi:~ cd hr50-api
micha@rpi:~/hr50-api$ ./bootstrap.sh
'''
```
# Examples
@ -44,17 +44,17 @@ For testing or other purposes, you can access the api with trhe help of curl or
Set the keying method to 'PTT':
'''
```
micha@rpi:~/hr50-api$ curl http://<IP_ADDRESS>:5000?cmd=hrmd1
'''
```
Set the keying method to 'COR':
'''
```
micha@rpi:~/hr50-api$ curl http://<IP_ADDRESS>:5000?cmd=hrmd2
'''
```
Query the status:
'''
```
micha@rpi:~/hr50-api$ curl http://<IP_ADDRESS>:5000/status
{"AVG":"43","BND":"15M","PEP":"60","PTT":"COR","STA":"RX","SWR":"1.9","TMP":"12C","VLT":"13.7V"}
'''
```