rpdom wrote: ↑
Wed Apr 10, 2019 2:08 pm
RogerW wrote: ↑
Wed Apr 10, 2019 1:42 pm
Do you know how vcgencmd gets its data?
It talks to the VideoCore part of the GPU. Secret magic, I'm afraid.
You can talk to the VideoCore directly with the mailbox protocol and get values directly. Documents are not so easy to find and are far from complete.
You will have an easier time opening a pipe and running vcgencmd
and then use fscanf to convert the output to a variable you can use.
If you're interested in the mailbox here's a link https://github.com/raspberrypi/firmware ... -interface