From 915a7211417a1810416d0e83c8e99e37f364f7de Mon Sep 17 00:00:00 2001 From: "Denis V. Dedkov" Date: Wed, 29 May 2024 09:55:01 +0200 Subject: [PATCH] Readme was added --- README.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..aff44db --- /dev/null +++ b/README.md @@ -0,0 +1,34 @@ +# noolite +Package noolite provide class for control Noolite Adapters PC11xx. + +Protocol described on url: https://gogs.dended.keenetic.pro/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 -aG noolite +``` + +## Using +Include lib in your project with CMake FetchContent: + +``` +include(FetchContent) +FetchContent_Declare( + noolite + GIT_REPOSITORY https://gogs.dended.keenetic.pro/ded/noolitelib.git + GIT_TAG master +) +FetchContent_MakeAvailable(noolite) +``` + +Example for switch light on channel 3: + +``` +noolitelib::Noolite adapter; + +adapter.sendCommand(3, noolitelib::Switch); +```