# hawksoft.serialPortComm package

- [hawksoft.serialPortComm package](#hawksoftserialportcomm-package)
  - [Installation:](#installation)
  - [usage:](#usage)

Provides a comm thread which send and receive bytes from serial port. The main thread can communicate with comm thread by  send and receive fucntion.

I also provides an pyknow knowledge library to control traffic lights.


## Installation:

```
pip install hawksoft.serialPortComm
```

## usage:

```
from hawksoft import comm
comm.start('COM1',9600)
...
frames = comm.receive()
...
comm.send(b'\x01\x02')
...
comm.close()
...
comm.close()

```


To test the knowledge library, type command as follows:
```
traffic
```
