Difference between revisions of "Template:FriendlyCoreS5Pxx18"

From FriendlyELEC WiKi
Jump to: navigation, search
(Power Off and Schedule Power On)
(updated by API)
Line 1: Line 1:
===Run Qt5.9 Demo with GPU acceleration===
+
===Run Qt 5.10.0 Demo with GPU acceleration===
 
Run the following command<br />
 
Run the following command<br />
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
Line 6: Line 6:
 
[[File:S5pxx18-qt5.9demo.png|frameless|400px|S5pxx18-QtE]]
 
[[File:S5pxx18-qt5.9demo.png|frameless|400px|S5pxx18-QtE]]
  
===Run Qt5.9 Demo with OpenGL===
+
===Run Qt 5.10.0 Demo with OpenGL===
 
Run the following command<br />
 
Run the following command<br />
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
Line 14: Line 14:
 
./qopenglwidget
 
./qopenglwidget
 
</syntaxhighlight>
 
</syntaxhighlight>
For more Qt5.9 examples, please go to: <br />
+
For more Qt 5.10.0 examples, please go to: <br />
 
cd $QTDIR/examples/
 
cd $QTDIR/examples/
  

Revision as of 07:44, 11 August 2018

1 Run Qt 5.10.0 Demo with GPU acceleration

Run the following command

$ sudo qt5demo

S5pxx18-QtE

2 Run Qt 5.10.0 Demo with OpenGL

Run the following command

. setqt5env
cd $QTDIR
cd /examples/opengl/qopenglwidget
./qopenglwidget

For more Qt 5.10.0 examples, please go to:
cd $QTDIR/examples/

3 Play HD Video with Hardware-decoding

gst-player is console player, it base on GStreamer, support VPU with Hardware-decoding:

sudo gst-player /home/pi/demo.mp4

The equivalent gsteamer command is as follows:

sudo gst-launch-1.0 filesrc location=/home/pi/demo.mp4 ! qtdemux name=demux demux. ! queue ! faad ! audioconvert ! audioresample ! alsasink device="hw:0,DEV=1" demux. ! queue ! h264parse ! nxvideodec ! nxvideosink dst-x=0 dst-y=93 dst-w=1280 dst-h=533

4 Connect to DVP Camera CAM500B

The CAM500B camera module is a 5M-pixel camera with DVP interface. For more tech details about it you can refer to Matrix - CAM500B.
Under Debian/Ubuntu a camera utility "nanocams" is available for previewing 40 frames and picture taking. You can try it by following the commands below

sudo nanocams -p 1 -n 40 -c 4 -o IMG001.jpg

For more details about the usage of the nanocams run "nanocams -h". You can get its source code from our git hub:

git clone https://github.com/friendlyarm/nexell_linux_platform.git

5 Power Off and Schedule Power On

“PMU Power Management” feature helps us to auto power on the board at a specific time, it is implemented by an MCU, support software power-off, and RTC alarm power-up functions.

Here’s a simple guide:
Turn on automatically after 100 seconds. (Time must be greater than 60 seconds.):

$ sudo echo 100 > /sys/class/i2c-dev/i2c-3/device/3-002d/wakealarm

After setting up the automatic boot, turn off board with the 'poweroff’ command:

$ sudo poweroff

Cancel automatic boot:

$ sudo echo 0 > /sys/class/i2c-dev/i2c-3/device/3-002d/wakealarm

Query the current settings, in the front is current time, followed by the time of automatic booting: If no automatic boot is set, it will display "disabled”.

$ sudo cat /sys/class/i2c-dev/i2c-3/device/3-002d/wakealarm


Note that some older versions of hardware may not support this feature, if you don't see this file node in your system:
/sys/class/i2c-dev/i2c-3/device/3-002d/wakealarm
your board may be it does not support this feature.