Difference between revisions of "Template:FriendlyCoreS5Pxx18/zh"

From FriendlyELEC WiKi
Jump to: navigation, search
(连接DVP摄像头模块(CAM500B))
(updated by API)
Line 39: Line 39:
 
git clone https://github.com/friendlyarm/nexell_linux_platform.git
 
git clone https://github.com/friendlyarm/nexell_linux_platform.git
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 
===Power Off and Schedule Power On===
 
===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 a Cortex-M0 MCU, support software power-off, and RTC alarm power-up functions. <br>
+
“PMU Power Management” feature helps us to auto power on the board at a specific time, it is implemented by a Cortex-M0 MCU, support software power-off, and RTC alarm power-up functions. <br><br>
 
Here’s a simple guide: <br>
 
Here’s a simple guide: <br>
 
Turn on automatically after 100 seconds. (Time must be greater than 60 seconds.):
 
Turn on automatically after 100 seconds. (Time must be greater than 60 seconds.):

Revision as of 05:46, 8 March 2018

1 运行 Qt5.9 演示程序

Ubuntu core系统集成了Qt5.9图形库,支持OpenGL硬件加速,在命令行输出以下命令,可预览Qt5演示程序,
Qt5演示程序的界面如下图所示,你可以使用触摸屏或者鼠标来操作,Qt5支持大部分FriendlyELEC在售的LCD触摸屏:

$ sudo qt5demo

S5pxx18-QtE

2 运行 Qt5-OpenGL示例

Run the following command

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

更多示例可以在这里找到:
cd $QTDIR/examples/

3 硬解播放高清视频

FriendlyCore系统集成支持VPU加速的GStreamer 1.0多媒体开发框架, 可在命令行输入以下命令,播放1080P的演示视频:

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

gst-player是一个GStreamer播放器的外壳程序,上面命令等效于Gsteamer的以下命令:

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 连接DVP摄像头模块(CAM500B)

CAM500B是一款500万像素摄像头模块,以DVP并行信号输出,详细信息请参考Matirx-CAM500B
Debian/Ubuntu系统集成了命令行的摄像头示例程序nanocams,登录后输入以下命令即可预览40桢然后拍照保存为指定的文件。

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

更详细的命令行参数可执行命令“nanocams -h”。
如果要下载源代码,运行以下命令即可获得:

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 a Cortex-M0 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.