Program to control TFT Backlight 'sleep mode' with juj/fbcp-ili9341 driver
#1
Lightbulb 
This programs is design to work aside of Freeplay setPCA9633 on Raspberry Pi 3 on Freeplay Zero/CM3 platform (with installed backlight control).
It also require to have juj fbcp-ili9341 driver running with backlight control and backlight pin set.


# Provided scripts :
- compile.sh : Compile cpp file (run this first).
- install.sh : Install service (need restart)
- remove.sh : Remove service

GitHub :  https://github.com/porcinus/FreeplayBacklightDaemon

Driver compilation cmd : cmake -DFREEPLAYTECH_WAVESHARE32B=ON -DSPI_BUS_CLOCK_DIVISOR=6 -DDISPLAY_BREAK_ASPECT_RATIO_WHEN_SCALING=ON -DBACKLIGHT_CONTROL=ON -DGPIO_TFT_BACKLIGHT=31 -DSTATISTICS=0 ..

Please note: This line use gpio pin 31, I don't think it's in use but not sure...
Don't miss to edit nns-freeplay-backlight-daemon.service set path and pin correctly.

Todo/ideas:
- [DONE] Monitor evdev, need more work to ignore analog input (workaround for noisy line)
- [ABORT] go in sleep mode if no input detected, wrong idea if some want to watch a movie...
- [DONE] Look around pthread to avoid use of system()

pthread version look stable, reduce cpu load by around 2-3 time but 'huge' increase in memory usage. There is 2 child threads (gpio, evdev), 8mb heap for each.
Reply


Messages In This Thread
Program to control TFT Backlight 'sleep mode' with juj/fbcp-ili9341 driver - by Porcinus - 12-16-2018, 06:02 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)