API for DS1808 Dual Log Digital Potentiometer as a Light Controller.
More...
The Maxim Integrated DS1808 Dual Log Digital Potentiometer
- ID: ds1808lc
- Name: Lighting Controller
- Other Names: DS1808LC
- Category: light
- Manufacturer: maxim
- Connection: i2c
std::cout << "Existing state: "; printState(lightController);
if (argc == 2)
{
std::string arg = argv[1];
int brightness = ::atoi(argv[1]);
if (brightness > 0)
{
lightController.setPowerOn();
lightController.setBrightness(brightness);
}
else
lightController.setPowerOff();
}
std::cout << "Now: ";printState(lightController);
const char* getModuleName |
( |
| ) |
|
|
inlinevirtual |
Returns name of module. This is the string in library name after libupm_
- Returns
- name of module
Implements IModuleStatus.
Get power state
- Returns
- true if powered, false otherwise
- Exceptions
-
Implements ILightController.
Get brightness
- Returns
- brightness as percentage
- Exceptions
-
Implements ILightController.
void setBrightness |
( |
int |
percent | ) |
|
|
virtual |
Set brightness
- Parameters
-
percent | brightness as percentage |
- Exceptions
-
Implements ILightController.
The documentation for this class was generated from the following files: