更改

跳转至: 导航搜索

Orange Pi Zero 3

添加313字节, 2023年7月3日 (一) 16:26
红外接收测试
</div></li>
<li><p>安装ir-keytable 红外测试软件</p></li></ol>
{| class="wikitable" style="width:800px;"
|-
|
orangepi@orangepi:~$ '''sudo''' '''apt update'''
orangepi@orangepi:~$ '''sudo''' '''apt-get install -y ir-keytable'''
|}</li></ol>
<ol start="3" style="list-style-type: decimal;">
<li><p>然后执行ir-keytable可以查看红外设备的信息</p>
<ol style="list-style-type: lower-alpha;">
<li>linux5.4系统输出如下所示</li></ol></li></ol>
{| class="wikitable" style="width:800px;"
|-
|
orangepi@orangepi:~$ '''ir-keytable'''
Found /sys/class/rc/rc0/ (/dev/input/event1) with:
:Driver: sunxi-rc-recv, table: rc_map_sunxi lirc device: /dev/lirc0
Supported protocols: lirc necdevice: /dev/lirc0
Enabled :Supported protocols: lirc nec
Name: sunxi_ir_recvEnabled protocols: lirc nec
bus: 25, vendor/productName: 0001:0001, version: 0x0100sunxi_ir_recv
Repeat delay = 500 ms:bus: 25, repeat period = 125 msvendor/product: 0001:0001, version: 0x0100
:Repeat delay = 500 ms, repeat period = 125 ms
|}
</ol>
<ol start="2" style="list-style-type: lower-alpha;">
<li><p>linux6.1系统的输出如下所示</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>orangepi@orangepi:~$ '''ir-keytable'''</p>
<p>Found /sys/class/rc/rc0/ with:</p>
:<p>Name: sunxi-ir</p>:<p>Driver: sunxi-ir</p>:<p>Default keymap: rc-empty</p>:<p>Input device: /dev/input/event5</p>:<p>LIRC device: /dev/lirc0</p>:<p>Attached BPF protocols: Operation not permitted</p>:<p>Supported kernel protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp imon rc-mm</p>:<p>Enabled kernel protocols: lirc</p>:<p>bus: 25, vendor/product: 0001:0001, version: 0x0100</p>:<p>Repeat delay = 500 ms, repeat period = 125 ms</p>|}</li></ol></li></ol>
<!-- -->
<ol start="4" style="list-style-type: decimal;">
<li><p>测试红外接收功能前需要准备一个Orange Pi专用的红外遥控器,'''<span style="color:#FF0000">其他遥控器不支持</span>'''</p>
<div class="figure">
<li><p>然后在终端中输入'''ir-keytable -t'''命令,再使用红外遥控器对着Orange Pi开发板的红外接收头按下按键就能在终端中看到接收到的按键编码了</p>
<ol style="list-style-type: lower-alpha;">
<li>linux5.4系统输出如下所示</li></ol></li></ol>
{| class="wikitable" style="width:800px;"
|-
|
orangepi@orangepi:~$ '''sudo ir-keytable -t'''
1598339152.914715: event type EV_MSC(0x04): scancode = 0xfb0410
|}</ol>
<ol start="2" style="list-style-type: lower-alpha;">
<li><p>linux6.1系统输出如下所示</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>orangepi@orangepi:~$ '''sudo ir-keytable -c -p NEC -t'''</p>
<p>Old keytable cleared</p>
<p>202.063219: lirc protocol(nec): scancode = 0x45c</p>
<p>202.063249: event type EV_MSC(0x04): scancode = 0x45c</p>
<p>202.063249: event type EV_SYN(0x00).</p>|}</li></ol></li></ol>
== 温度传感器 ==
8,460
个编辑

导航菜单