ELI101-IPHW
User’s Manual
5/28/20
Copyright ©2020
Page
13
of
15
Figure 9. Raspberry Pi Signal and Ground
The ELI backlight can be controlled from a Raspberry Pi. See Figure 9 for a wiring diagram. Our software
is available on the FDI website at
https://www.teamfdi.com/product-details/eli101-iphw#software
may copy the code from here:
/* Changes brightness of ELI backlight given a command line argument between 0 and
the set range. Uses bcm2835 header file provided by Broadcom at
http://www.airspayce.com/mikem/bcm2835/bcm2835-1.52.tar.gz
This source code must be
compiled using "g++ brightness.cpp -o brightness -l bcm2835"in order to properly
link the header file. Must be run using sudo, accessing GPIO pins requires root
permissions. After compiling, you may add executable to "/usr/bin" which allows you
to type "sudo brightness <value>" to change brightness anywhere in terminal. The
"/boot/config.txt" file must also be changed by adding a "#" before the line
"dtparam=audio=on". This disables audio output from the Raspberry Pi. If this is
not disabled then anytime sound is output the screen will return to 100%
brightness.
*/
#include<iostream>
#include<bcm2835.h>
#include<string>
using
namespace
std
;
#define LED RPI_GPIO_P1_12
// PWM pin number for backlight control
#define RANGE 20
// Range for PWM steps
#define CLOCK 1920
// Clock rate