diff --git a/README.md b/README.md index 29d730b..1c42150 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,14 @@ String api_base_url = "http://192.168.1.100:5000"; Add the files to your Arduino IDE, install all necessary libraries, configure the board and USB/serial port, compile the sketch and then upload it. +## Usage + +Execute the server (see below) and power up the ESP board. The following user interaction is possible: + +* short press of the upper button: executes a shell script / system command / program (Server config parameter 'shell_cmd') +* long press of the upper button: sends a serial commannd to the HR50. The default command will initiate the tuning cycle during the next transmission (Server config parameter 'serial_cmd') +* the lower button reboots the device + ## Error handling * If wifi is unavailable or misconfigured, the device will show "No Wifi!" on the screen @@ -72,13 +80,20 @@ You need a computer connected to the Hardrock-50 via USB, e.g. a Raspberry Pi. T # Configuration -Open the file _hr50_rd_server.py_ and adapt the following lines to your environment: +Open the file _hr50_rd_server.py_ and adapt the following lines to your environment regarding the USB connection to the HR50: ``` serial_port = '/dev/ttyUSB0' baud = 19200 ``` +Edit the following lines if you want to customize the actions performed when pressing the upper button: + +``` +shell_cmd = "./scripts/toggle_antenna.sh" +serial_cmd = "hrtu1" +``` + # Execution Executing this script will spawn a web server running on port 5000. This is not meant for production use and/or public exposure. Anyone able to access this server via the network can alter any settings on your HR50.