Difference between revisions of "Example brightness"
(→Using brightness) |
(→Using brightness) |
||
Line 41: | Line 41: | ||
./brightness | ./brightness | ||
+ | |||
+ | A GTK+ UI appears on the LCD. | ||
+ | |||
+ | [[File:Gtk interface.jpg]] | ||
+ | |||
+ | Slide the slider, click the spinner arrows or enter a new brightness value (in range [0,255]) to change the LCD backlight value. |
Revision as of 11:32, 27 December 2013
This is a guide to the brightness
C example project included in the EMAC OE SDK.
This is a simple backlight-brightness control. It's written for the EMAC PPC-E7 and SoM-9307 but it will probably run on anything with a backlight. It implements a slider application in GTK+ that directly controls the backlight through its sysfs interface. It has been tested under Xfbdev/Matchbox.
The brightness
project builds one executable: brightness
.
Contents
Opening, Building and Uploading the Project Files
1. Open the C/C++ editing perspective.
stub
2. Open the project files.
stub
3. Build the project.
stub
4. Upload the executables to the target system.
stub
Usage and Behavior
The brightness
C example project creates a GTK+ UI for controlling the backlight-brightness. It gives us a slider, a spinner and a textfield.
Hardware Requirements
The brightness
C example project is written for the EMAC PPC-E7 and SoM-9307 but it will probably run on anything with a backlight.
Using brightness
From the terminal, first set the DISPLAY variable.
export DISPLAY=:0.0
Then run the brightness
C executable.
./brightness
A GTK+ UI appears on the LCD.
Slide the slider, click the spinner arrows or enter a new brightness value (in range [0,255]) to change the LCD backlight value.