Skip to content

Commit c5249f8

Browse files
authored
Update README.md
1 parent 1ed96dc commit c5249f8

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,21 @@
55

66
This library allows a Python 3 client to connect to an AnimatedLEDStrip server, allowing the client to send animations to the server and receive currently running animations from the server, among other information.
77

8+
## Adding the Library to a Project
9+
The library is available via pip:
10+
11+
```bash
12+
pip3 install animatedledstrip-client
13+
```
14+
815
## Creating an `AnimationSender`
916
An `AnimationSender` is constructed with two arguments:
1017
- `ip_address`: The IP address of the server (as a string)
1118
- `port_num`: The port that the client should connect to (as an integer)
1219

1320
```python
21+
from animatedledstrip import AnimationSender
22+
1423
sender = AnimationSender("10.0.0.254", 5)
1524
```
1625

@@ -32,6 +41,8 @@ sender.end()
3241
An animation can be sent to the server by creating an instance of the `AnimationData` class, then calling `send_animation()` with the instance as the argument.
3342

3443
```python
44+
from animatedledstrip import AnimationData, ColorContainer
45+
3546
color = ColorContainer()
3647
color.add_color(0xFF)
3748
color.add_color(0xFF00)

0 commit comments

Comments
 (0)