Skip to content

Commit

Permalink
Fix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
rdnt committed Aug 13, 2019
1 parent 08a3e1c commit 278b35d
Showing 1 changed file with 31 additions and 28 deletions.
59 changes: 31 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,47 +28,50 @@ When the connection is established, the client will stream data to the server vi
*Whatever dude how do I install it?*

## Installation instructions
- **Client** (e.g. Windows PC):
1. Download the *client* binary for your operating system from [here](https://github.com/SHT/Core/releases/latest/).
2. Create a `run.bat` file on the same folder as the binary.
3. Paste the following on the `run.bat` file, replacing `IP`, `PORT`, `LEDS_COUNT` and `FRAMERATE` accordingly.

```
client.exe IP PORT LEDS_COUNT FRAMERATE
```
#### Client (e.g. Windows PC)

4. Double click the `run.bat` file to launch the client. It will autoconnect to the server once the server is online.
1. Download the *client* binary for your operating system from [here](https://github.com/SHT/Core/releases/latest/).
2. Create a `run.bat` file on the same folder as the binary.
3. Paste the following on the `run.bat` file, replacing `IP`, `PORT`, `LEDS_COUNT` and `FRAMERATE` accordingly.

```
client.exe IP PORT LEDS_COUNT FRAMERATE
```

- **Server** (e.g. Raspberry Pi Zero W):
1. Download the *server* binary for your operating system from [here](https://github.com/SHT/Core/releases/latest/).
2. Install `tmux` using the following command:
4. Double click the `run.bat` file to launch the client. It will autoconnect to the server once the server is online.

`sudo apt-get install tmux`

3. Create a `run.sh` file on the same folder as the binary. Make sure the file is marked as executable:
#### Server (e.g. Raspberry Pi Zero W)

`chmod +x server`
1. Download the *server* binary for your operating system from [here](https://github.com/SHT/Core/releases/latest/).
2. Install `tmux` using the following command:

4. Paste the following on the `run.sh` file, replacing `AMBILIGHT_FOLDER`, `LEDS_COUNT`, `BRIGHTNESS`, `PIN` and `PORT` accordingly.
The arguments `PIN` and `PORT` are optional and default to `18` and `4197` respectively.
`sudo apt-get install tmux`

```
#!/bin/bash
tmux new-session -d -s ambilight 'cd /AMBILIGHT_FOLDER && ./server LEDS_COUNT BRIGHTNESS PIN PORT'
```
3. Create a `run.sh` file on the same folder as the binary. Make sure the file is marked as executable:

5. (optional) Start the server at boot: Edit the `/etc/rc.local` file, adding the following before the `exit 0` line, replacing `AMBILIGHT_FOLDER` with the folder where the ambilight server binary resides.
`chmod +x server`

```
/AMBILIGHT_FOLDER/run.sh
```
4. Paste the following on the `run.sh` file, replacing `AMBILIGHT_FOLDER`, `LEDS_COUNT`, `BRIGHTNESS`, `PIN` and `PORT` accordingly.
The arguments `PIN` and `PORT` are optional and default to `18` and `4197` respectively.

6. Execute the run.sh file to start the Ambilight server (or reboot if you configured start at boot):
```
#!/bin/bash
tmux new-session -d -s ambilight 'cd /AMBILIGHT_FOLDER && ./server LEDS_COUNT BRIGHTNESS PIN PORT'
```

```
./run.sh
```
5. (optional) Start the server at boot: Edit the `/etc/rc.local` file, adding the following before the `exit 0` line, replacing `AMBILIGHT_FOLDER` with the folder where the ambilight server binary resides.

```
/AMBILIGHT_FOLDER/run.sh
```

6. Execute the run.sh file to start the Ambilight server (or reboot if you configured start at boot):

```
./run.sh
```

## Modes

Expand Down

0 comments on commit 278b35d

Please sign in to comment.