Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Programs to display information to LCD framebuffer
The interest of the program set is to generate a PNG file contening CPU load and temperature, Wifi link speed, time and battery voltage then display this file to LCD framebuffer out of driver update zone.

Battery voltage display is optional. To get it work, you will need to make a voltage divider then connect it to a ADC input.
In my case, here is the schema using L2R2 addon board:

(Battery+) Vin---+
                         R1 (resistor)
                         +-------------------Vout (ADC)
                        R2 (resistor)
(Battery-) gnd---+

Vin is solder in positive pin on one of the battery connector.
gnd is solder directly on addon board.
R1 is 9.1kohm resistor and R2 is 22kohm resistor.
Vout is solder in a ADC input.

/!\ Please note:
When handheld is off and not charging, this setup will drain a little bit of current, around 0.2mah for me using these resistors value.
The lower resistance value is the higher current draw will be. In my initial test, I was using 91ohm and 220ohm and the current draw was around 10mah, so if handheld was offline for one full week the battery was losing more than 3/4 of its capacity Undecided

Edit: Now use dispmanx based software to avoid modifications of framebuffer.

To compile these programs you will need to have g++, libgd, libpng, libfreetype, libjpeg dev packages setup on your system.
/!\ Please note: code is far from optimized, never tested in Freeplay Zero platform.

Real world example:

For GL/Dispmanx 'OSD':

- [DONE] Add overheat / undervoltage icon.
- [DONE] Avoid use of ffmpeg and omxplayer, implemented as img2dispmanx, speedup overlay display by 0.7sec.
- [DONE] Add low battery (based on gpio, need to be set in program argument)(should be pin 7 in cm3).
- [DONE] Now detect screen size by itself.

Messages In This Thread
Programs to display information to LCD framebuffer - by Porcinus - 12-04-2018, 10:44 AM

Forum Jump:

Users browsing this thread: 1 Guest(s)