35 lines
873 B
Markdown
35 lines
873 B
Markdown
# noolite
|
|
Package noolite provide class for control Noolite Adapters PC11xx.
|
|
|
|
Protocol described on url: https://gogs.dended.ru/ded/noolitelib/src/master/docs/PC11xx_HID_API.pdf
|
|
|
|
To have access on device from common user add the next rule to udev. For example to /etc/udev/rules.d/50-noolite.rules next line:
|
|
```
|
|
ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05df", SUBSYSTEMS=="usb", ACTION=="add", MODE="0666", GROUP="noolite"
|
|
```
|
|
Then add your user to `noolite` group:
|
|
```
|
|
sudo usermod <user> -aG noolite
|
|
```
|
|
|
|
## Using
|
|
Include lib in your project with CMake FetchContent:
|
|
|
|
```
|
|
include(FetchContent)
|
|
FetchContent_Declare(
|
|
noolite
|
|
GIT_REPOSITORY https://gogs.dended.ru/ded/noolitelib.git
|
|
GIT_TAG master
|
|
)
|
|
FetchContent_MakeAvailable(noolite)
|
|
```
|
|
|
|
Example for switch light on channel 3:
|
|
|
|
```
|
|
noolitelib::Noolite adapter;
|
|
|
|
adapter.sendCommand(3, noolitelib::Switch);
|
|
```
|