Data Sheet

4D SYSTEMS 4DPi-35 Primary Display Raspberry Pi Compatible
© 2015 4D SYSTEMS Page 9 of 14 www.4dsystems.com.au
4DPi
-35
Primary Display
Raspberry Pi
To turn the backlight off:
sudo echo 0 > /sys/class/backlight/4dpi-35-
pwm/brightness
To turn the backlight on (scale of 1 to 255):
sudo echo 255 > /sys/class/backlight/4dpi-
35-pwm/brightness
The same brightness parameter controls the
backlight for both on/off control and PWM
control. If the cmdline.txt file has PWM enabled
and the value of the brightness variable is set to be
1 or higher, the PWM on the Raspberry Pi
activates, 1 being very dim and 255 being full
brightness.
If the cmdline.txt file has PWM disabled and the
value of the brightness variable is set to 1 or
higher, the backlight will simply be on full
brightness.
Setting the brightness parameter to 0 in either
case will disable the backlight.
If GPIO18 is desired to be used for other purposes
(such as analog Audio), be sure to set the
cmdline.txt file to disable the PWM, and it will not
be used by the brightness parameter and
backlight.
Parameters Listing
The following is a list of all the custom parameters
used by the 4DPi-35.
rotate: Screen rotation 0/90/180/270 (int)
compress: SPI compression 0/1/2/3/4/5/6/7 (int)
pwm: PWM backlight control on GPIO18 1/0 (int)
product_code: Force product code (int)
sclk: SPI clock frequency (long)
Valid product codes are:
0xab - 4DPi-35 (3.5” 4D Systems Pi Display)
0xac - 4DPi-35 (3.5” 4D Systems Pi Display)
Valid SPI Frequency values (4dpi.sclk):
Values can be almost anything. This has been
tested up to 64Mhz. Common values would
include 64000000 (64MHz), 48000000 (Default),
32000000, 24000000 etc.
Valid Compression values (4dpi.compress):
0 (compression off)
1 (compression on, auto set based on sclk value)
2 (lowest), 3, 4, 5, 6, 7 (highest compression)
These parameters can be set or read from the
/boot/cmdline.txt file, and they can be read from
the /sys/modules/4dpi/parameters directory.
For example:
cat /sys/modules/4dpi/parameters/rotate
Will display the current value of the screen
rotation parameter.