{"id":4331,"date":"2023-11-17T10:19:32","date_gmt":"2023-11-17T02:19:32","guid":{"rendered":"http:\/\/www.wangkaixuan.tech\/?p=4331"},"modified":"2023-11-17T10:19:32","modified_gmt":"2023-11-17T02:19:32","slug":"%e5%85%a5%e5%9d%91%e6%a0%91%e8%8e%93%e6%b4%be-05-%e7%ba%a2%e5%a4%96%e9%81%a5%e6%8e%a7","status":"publish","type":"post","link":"http:\/\/www.wangkaixuan.tech\/?p=4331","title":{"rendered":"\u5165\u5751\u6811\u8393\u6d3e-05-\u7ea2\u5916\u9065\u63a7"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\">1.\u9065\u63a7\u6d4b\u8bd5<\/h1>\n\n\n\n<p>\u6269\u5c55\u677f\u4e0a\u6709\u4e2a\u7ea2\u5916\u9065\u63a7\u6a21\u5757\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"451\" height=\"546\" src=\"http:\/\/www.wangkaixuan.tech\/wp-content\/uploads\/2023\/11\/image-46.png\" alt=\"\" class=\"wp-image-4332\" srcset=\"http:\/\/www.wangkaixuan.tech\/wp-content\/uploads\/2023\/11\/image-46.png 451w, http:\/\/www.wangkaixuan.tech\/wp-content\/uploads\/2023\/11\/image-46-248x300.png 248w, http:\/\/www.wangkaixuan.tech\/wp-content\/uploads\/2023\/11\/image-46-223x270.png 223w\" sizes=\"auto, (max-width: 451px) 100vw, 451px\" \/><\/figure>\n\n\n\n<p>\u4e3a\u4e86\u6d4b\u8bd5\u8fd9\u4e2a\u6a21\u5757\uff0c\u6211\u628a\u5b69\u5b50\u56fd\u5b66\u673a\u4e0a\u7684\u9065\u63a7\u5668\u62ff\u8fc7\u6765\u4e86\uff08\u5176\u5b9e\u968f\u4fbf\u627e\u4e00\u4e2a\u7ea2\u5916\u9065\u63a7\u5668\u5c31\u884c\uff09\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"218\" height=\"721\" src=\"http:\/\/www.wangkaixuan.tech\/wp-content\/uploads\/2023\/11\/image-47.png\" alt=\"\" class=\"wp-image-4333\" srcset=\"http:\/\/www.wangkaixuan.tech\/wp-content\/uploads\/2023\/11\/image-47.png 218w, http:\/\/www.wangkaixuan.tech\/wp-content\/uploads\/2023\/11\/image-47-91x300.png 91w, http:\/\/www.wangkaixuan.tech\/wp-content\/uploads\/2023\/11\/image-47-82x270.png 82w\" sizes=\"auto, (max-width: 218px) 100vw, 218px\" \/><\/figure>\n\n\n\n<p>\u8fd0\u884c\u4e0b\u9762\u7684\u4ee3\u7801\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#include &lt;bcm2835.h>\n#include &lt;stdio.h>\n#include &lt;stdlib.h>\n#include &lt;unistd.h>\n\n\/\/ gcc -o irm irm.c -lbcm2835\n\n#define IRM_PIN 18\n\nint main()\n{\n\tif (!bcm2835_init())\n\t\treturn 1;\n\n\tbcm2835_gpio_fsel(IRM_PIN, BCM2835_GPIO_FSEL_INPT);\n\tbcm2835_gpio_set_pud(IRM_PIN, BCM2835_GPIO_PUD_UP);\n\n\tunsigned char i,idx,cnt;\n\tunsigned char count;\n\tunsigned char data&#91;4];\n\twhile (1)\n\t{\n\t\tif (bcm2835_gpio_lev(IRM_PIN) != 0)\n\t\t{\n\t\t\tusleep(1000);\n\t\t\tcontinue;\n\t\t}\n\n\t\tcount = 0;\n\t\twhile (bcm2835_gpio_lev(IRM_PIN) == 0 &amp;&amp; count++ &lt; 200) \/\/9ms\n\t\t\tdelayMicroseconds(60);\n\n\t\tcount = 0;\n\t\twhile (bcm2835_gpio_lev(IRM_PIN) == 1 &amp;&amp; count++ &lt; 80) \/\/4.5ms\n\t\t\tdelayMicroseconds(60);\n\n\t\tidx = 0;\n\t\tcnt = 0;\n\t\tdata&#91;0]=0;\n\t\tdata&#91;1]=0;\n\t\tdata&#91;2]=0;\n\t\tdata&#91;3]=0;\n\t\tfor (i = 0; i &lt; 32; i++)\n\t\t{\n\t\t\tcount = 0;\n\t\t\twhile (bcm2835_gpio_lev(IRM_PIN) == 0 &amp;&amp; count++ &lt; 15) \/\/0.56ms\n\t\t\t\tdelayMicroseconds(60);\n\n\t\t\tcount = 0;\n\t\t\twhile (bcm2835_gpio_lev(IRM_PIN) == 1 &amp;&amp; count++ &lt; 40) \/\/0: 0.56ms; 1: 1.69ms\n\t\t\t\tdelayMicroseconds(60);\n\n\t\t\tif (count > 25)\n\t\t\t\tdata&#91;idx] |= (1&lt;&lt;cnt);\n\n\t\t\tif (cnt== 7)\n\t\t\t{\n\t\t\t\tcnt=0;\n\t\t\t\tidx++;\n\t\t\t}\n\t\t\telse\n\t\t\t\tcnt++;\n\t\t}\n\t\tif ((data&#91;0]+data&#91;1] == 0xFF) &amp;&amp; (data&#91;2]+data&#91;3]==0xFF))\n\t\t{\n\t\t\tprintf(\"0x%02x\\n\",data&#91;2]);\n\t\t}\n\t}\n\n\tbcm2835_close();\n\treturn 0;\n}<\/code><\/pre>\n\n\n\n<p>\u7136\u540e\u968f\u4fbf\u6309\u4e0b\u9065\u63a7\u5668\u7684\u51e0\u4e2a\u6309\u952e\uff0c\u5c4f\u5e55\u4e0a\u5c31\u4f1a\u8f93\u51fa\u76f8\u5173\u7684\u6309\u952e\u7801\u4e86\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"344\" height=\"187\" src=\"http:\/\/www.wangkaixuan.tech\/wp-content\/uploads\/2023\/11\/image-48.png\" alt=\"\" class=\"wp-image-4334\" srcset=\"http:\/\/www.wangkaixuan.tech\/wp-content\/uploads\/2023\/11\/image-48.png 344w, http:\/\/www.wangkaixuan.tech\/wp-content\/uploads\/2023\/11\/image-48-300x163.png 300w\" sizes=\"auto, (max-width: 344px) 100vw, 344px\" \/><\/figure>\n\n\n\n<p>\u7406\u8bba\u4e0a\uff0c\u6211\u4eec\u5199\u4e2aswitch\u8bed\u53e5\uff0c\u6536\u5230\u7279\u5b9a\u7684\u6309\u952e\u7801\u540e\u6267\u884c\u76f8\u5e94\u7684\u64cd\u4f5c\uff0c\u5c31\u80fd\u5b9e\u73b0\u7528\u9065\u63a7\u5668\u63a7\u5236\u505a\u4e00\u4e9b\u5b9e\u9645\u64cd\u4f5c\u4e86\u3002<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">2.\u9065\u63a7\u529f\u80fd<\/h1>\n\n\n\n<p>\u95ee\u98981\uff1a\u7ea2\u5916\u9065\u63a7\u63a5\u6536\u7a0b\u5e8f\u662f\u4e2aC\u7a0b\u5e8f\uff0c\u63a7\u5236\u5c4f\u5e55\u7684\u662f\u4e2apython\u7a0b\u5e8f\uff0c\u600e\u4e48\u5b9e\u73b0\u4e24\u4e2a\u7a0b\u5e8f\u7684\u8054\u52a8\u5462\uff1f<\/p>\n\n\n\n<p>\u6700\u7b80\u5355\u7684\u65b9\u6cd5\u662f\u5f04\u4e00\u4e2a\u4e2d\u95f4\u7684\u6587\u4ef6\uff0cC\u7a0b\u5e8f\u5c06\u6536\u5230\u7684\u6309\u952e\u7801\u5199\u5165\uff0cpython\u7a0b\u5e8f\u8bfb\u53d6\u6587\u4ef6\u4e2d\u7684\u6309\u952e\u7801\uff0c\u663e\u793a\u5bf9\u5e94\u7684\u5c4f\u5e55\u4fe1\u606f\u3002<\/p>\n\n\n\n<p>\u6211\u4eec\u51c6\u5907\u81ea\u5b9a\u4e49\u4e00\u4e0b\u8fd9\u51e0\u4e2a\u6309\u952e\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"393\" height=\"835\" src=\"http:\/\/www.wangkaixuan.tech\/wp-content\/uploads\/2023\/11\/image-49.png\" alt=\"\" class=\"wp-image-4335\" srcset=\"http:\/\/www.wangkaixuan.tech\/wp-content\/uploads\/2023\/11\/image-49.png 393w, http:\/\/www.wangkaixuan.tech\/wp-content\/uploads\/2023\/11\/image-49-141x300.png 141w, http:\/\/www.wangkaixuan.tech\/wp-content\/uploads\/2023\/11\/image-49-127x270.png 127w\" sizes=\"auto, (max-width: 393px) 100vw, 393px\" \/><\/figure>\n\n\n\n<p>\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#include &lt;bcm2835.h>\n#include &lt;stdio.h>\n#include &lt;stdlib.h>\n#include &lt;unistd.h>\n\n\/\/ gcc -o irmscreen irmscreen.c -lbcm2835\n\n#define IRM_PIN 18\n\nvoid key_cmd(unsigned char key_val)\n{\n\tswitch(key_val)\n\t{\n\tcase 0x45:\/\/\u5173\u673a\n\t\tsystem(\"echo 99 > \/root\/board\/product\/screen.txt\");\n\t\tbreak;\n\tcase 0x58:\/\/\u91cd\u542f\n\t\tsystem(\"echo 98 > \/root\/board\/product\/screen.txt\");\n\t\tbreak;\n\tcase 0x0c:\/\/\u6309\u952e1\n\t\tsystem(\"echo 1 > \/root\/board\/product\/screen.txt\");\n\t\tbreak;\n\tcase 0x18:\/\/\u6309\u952e2\n\t\tsystem(\"echo 2 > \/root\/board\/product\/screen.txt\");\n\t\tbreak;\n\tcase 0x5e:\/\/\u6309\u952e3\n\t\tsystem(\"echo 3 > \/root\/board\/product\/screen.txt\");\n\t\tbreak;\n\tcase 0x08:\/\/\u6309\u952e4\n\t\tsystem(\"echo 4 > \/root\/board\/product\/screen.txt\");\n\t\tbreak;\n\tcase 0x1c:\/\/\u6309\u952e5\n\t\tsystem(\"echo 5 > \/root\/board\/product\/screen.txt\");\n\t\tbreak;\n\tcase 0x5a:\/\/\u6309\u952e6\n\t\tsystem(\"echo 6 > \/root\/board\/product\/screen.txt\");\n\t\tbreak;\n\tcase 0x42:\/\/\u6309\u952e7\n\t\tsystem(\"echo 7 > \/root\/board\/product\/screen.txt\");\n\t\tbreak;\n\tcase 0x52:\/\/\u6309\u952e8\n\t\tsystem(\"echo 8 > \/root\/board\/product\/screen.txt\");\n\t\tbreak;\n\tcase 0x4a:\/\/\u6309\u952e9\n\t\tsystem(\"echo 9 > \/root\/board\/product\/screen.txt\");\n\t\tbreak;\n\tdefault:\n\t\tbreak;\n\t}\n}\n\nint main()\n{\n\tif (!bcm2835_init())\n\t\treturn 1;\n\n\tbcm2835_gpio_fsel(IRM_PIN, BCM2835_GPIO_FSEL_INPT);\n\tbcm2835_gpio_set_pud(IRM_PIN, BCM2835_GPIO_PUD_UP);\n\n\tunsigned char i,idx,cnt;\n\tunsigned char count;\n\tunsigned char data&#91;4];\n\twhile (1)\n\t{\n\t\tif (bcm2835_gpio_lev(IRM_PIN) != 0)\n\t\t{\n\t\t\tusleep(1000);\n\t\t\tcontinue;\n\t\t}\n\n\t\tcount = 0;\n\t\twhile (bcm2835_gpio_lev(IRM_PIN) == 0 &amp;&amp; count++ &lt; 200) \/\/9ms\n\t\t\tdelayMicroseconds(60);\n\n\t\tcount = 0;\n\t\twhile (bcm2835_gpio_lev(IRM_PIN) == 1 &amp;&amp; count++ &lt; 80) \/\/4.5ms\n\t\t\tdelayMicroseconds(60);\n\n\t\tidx = 0;\n\t\tcnt = 0;\n\t\tdata&#91;0]=0;\n\t\tdata&#91;1]=0;\n\t\tdata&#91;2]=0;\n\t\tdata&#91;3]=0;\n\t\tfor (i = 0; i &lt; 32; i++)\n\t\t{\n\t\t\tcount = 0;\n\t\t\twhile (bcm2835_gpio_lev(IRM_PIN) == 0 &amp;&amp; count++ &lt; 15) \/\/0.56ms\n\t\t\t\tdelayMicroseconds(60);\n\n\t\t\tcount = 0;\n\t\t\twhile (bcm2835_gpio_lev(IRM_PIN) == 1 &amp;&amp; count++ &lt; 40) \/\/0: 0.56ms; 1: 1.69ms\n\t\t\t\tdelayMicroseconds(60);\n\n\t\t\tif (count > 25)\n\t\t\t\tdata&#91;idx] |= (1&lt;&lt;cnt);\n\n\t\t\tif (cnt== 7)\n\t\t\t{\n\t\t\t\tcnt=0;\n\t\t\t\tidx++;\n\t\t\t}\n\t\t\telse\n\t\t\t\tcnt++;\n\t\t}\n\t\tif ((data&#91;0] + data&#91;1] == 0xFF) &amp;&amp; (data&#91;2] + data&#91;3] == 0xFF))\n\t\t{\n\t\t\t\/\/ printf(\"key: 0x%02x\\n\",data&#91;2]);\n\t\t\tkey_cmd(data&#91;2]);\n\t\t}\n\t}\n\n\tbcm2835_close();\n\treturn 0;\n}<\/code><\/pre>\n\n\n\n<p>\u7136\u540e\u4fee\u6539\u5c4f\u5e55\u5c55\u793a\u7684python\u4ee3\u7801\uff0c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import sys\nimport time\nimport busio\nimport socket\nimport fcntl\nimport struct\nimport board\nimport subprocess\n\nimport Adafruit_DHT\nimport adafruit_ssd1306\n\nfrom board import SCL, SDA\nfrom PIL import Image, ImageDraw, ImageFont\n\nfont_cn = ImageFont.truetype('\/root\/board\/fonts\/\u5fae\u8f6f\u96c5\u9ed1.ttf', 20)\nfont_en = ImageFont.truetype('\/root\/board\/fonts\/Courier_New.ttf', 14)\n\ndef get_ip_address(ifname):\n    s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)\n    return socket.inet_ntoa(fcntl.ioctl(\n        s.fileno(),\n        0x8915,  # SIOCGIFADDR\n        struct.pack('256s', str.encode(ifname&#91;:15]))\n    )&#91;20:24])\n\ndef show_screen_welcom():\n    oled.fill(0)\n    image = Image.new('1', (oled.width, oled.height))\n    draw = ImageDraw.Draw(image)\n    draw.text((0, 0),  '\u6b22\u8fce\u9875\u9762', font=font_cn, fill=255)\n    oled.image(image)\n    oled.show()\n\ndef show_screen_ip():\n    oled.fill(0)\n    WIFIADDR = \"\"\n    WIREADDR = \"\"\n    try:\n        WIFIADDR += get_ip_address('wlan0')\n    except IOError:\n        WIFIADDR += \"0.0.0.0\"\n    try:\n        WIREADDR += get_ip_address('eth0')\n    except IOError:\n        WIREADDR += \"0.0.0.0\"\n\n    image = Image.new('1', (oled.width, oled.height))\n    draw = ImageDraw.Draw(image)\n    draw.text((0, 10), WIFIADDR, font=font_en, fill=255)\n    draw.text((0, 30), WIREADDR, font=font_en, fill=255)\n    oled.image(image)\n    oled.show()\n\ndef show_screen_time():\n    oled.fill(0)\n    image = Image.new('1', (oled.width, oled.height))\n    draw = ImageDraw.Draw(image)\n    draw.text((0, 0),  time.strftime(\"%A\"), font=font_en, fill=255)\n    draw.text((0, 20), time.strftime(\"%Y-%m-%d\"), font=font_en, fill=255)\n    draw.text((0, 40), time.strftime(\"%X\"), font=font_en, fill=255)\n    oled.image(image)\n    oled.show()\n\ndef show_screen_stats():\n    oled.fill(0)\n    image = Image.new('1', (oled.width, oled.height))\n    draw = ImageDraw.Draw(image)\n\n    cmd = \"top -bn1 | grep load | awk '{printf \\\"%.2f\\\", $(NF-2)}'\"\n    cpustr = subprocess.check_output(cmd, shell=True).decode(\"utf-8\")\n    cmd = \"free -m | awk 'NR==2{printf \\\"%s MB\\\", $3 }'\"\n    memstr = subprocess.check_output(cmd, shell=True).decode(\"utf-8\")\n    cmd = \"df -h | awk '$NF==\\\"\/\\\"{printf \\\"%d GB\\\", $3}'\"\n    diskstr = subprocess.check_output(cmd, shell=True).decode(\"utf-8\")\n    cmd = \"expr `cat \/sys\/class\/thermal\/thermal_zone0\/temp` \/ 1000\"\n    tempstr = subprocess.check_output(cmd, shell=True).decode(\"utf-8\")\n    draw.text((0, 0),  \"CPU: \" + cpustr, font=font_en, fill=255)\n    draw.text((0, 14), \"MEM: \" + memstr, font=font_en, fill=255)\n    draw.text((0, 28), \"DSK: \" + diskstr, font=font_en, fill=255)\n    draw.text((0, 44), \"TMP: \" + tempstr, font=font_en, fill=255)\n    oled.image(image)\n    oled.show()\n\ndef show_screen_climate():\n    oled.fill(0)\n    image = Image.new('1', (oled.width, oled.height))\n    draw = ImageDraw.Draw(image)\n\n    humistr, tempstr = Adafruit_DHT.read_retry(Adafruit_DHT.DHT11, 4)\n\n    draw.text((0, 0),  '\u6e29\u5ea6 : {0:0.1f}\u5ea6'.format(tempstr), font=font_cn, fill=255)\n    draw.text((0, 20), '\u6e7f\u5ea6 : {0:0.1f}%'.format(humistr), font=font_cn, fill=255)\n\n    oled.image(image)\n    oled.show()\n\ndef show_screen_cpufreq():\n    oled.fill(0)\n    image = Image.new('1', (oled.width, oled.height))\n    draw = ImageDraw.Draw(image)\n\n    cmd = \"expr `cat \/sys\/devices\/system\/cpu\/cpu0\/cpufreq\/scaling_cur_freq` \/ 1000\"\n    cpu0str = subprocess.check_output(cmd, shell=True).decode(\"utf-8\")\n    cmd = \"expr `cat \/sys\/devices\/system\/cpu\/cpu1\/cpufreq\/scaling_cur_freq` \/ 1000\"\n    cpu1str = subprocess.check_output(cmd, shell=True).decode(\"utf-8\")\n    cmd = \"expr `cat \/sys\/devices\/system\/cpu\/cpu2\/cpufreq\/scaling_cur_freq` \/ 1000\"\n    cpu2str = subprocess.check_output(cmd, shell=True).decode(\"utf-8\")\n    cmd = \"expr `cat \/sys\/devices\/system\/cpu\/cpu3\/cpufreq\/scaling_cur_freq` \/ 1000\"\n    cpu3str = subprocess.check_output(cmd, shell=True).decode(\"utf-8\")\n\n    draw.text((0, 0),   \"CPU0 : \" + cpu0str, font=font_en, fill=255)\n    draw.text((0, 15),  \"CPU1 : \" + cpu1str, font=font_en, fill=255)\n    draw.text((0, 30),  \"CPU2 : \" + cpu2str, font=font_en, fill=255)\n    draw.text((0, 45),  \"CPU3 : \" + cpu3str, font=font_en, fill=255)\n\n    oled.image(image)\n    oled.show()\n\ndef show_screen_help(helpstr):\n    oled.fill(0)\n    image = Image.new('1', (oled.width, oled.height))\n    draw = ImageDraw.Draw(image)\n\n    draw.text((0, 0),   helpstr, font=font_cn, fill=255)\n\n    oled.image(image)\n    oled.show()\n\ni2c = busio.I2C(SCL, SDA)\n\noled = adafruit_ssd1306.SSD1306_I2C(128, 64, i2c)\n\nfunc = 0\n\nwhile True:\n    cmd = \"cat \/root\/board\/product\/screen.txt\"\n    func = subprocess.check_output(cmd, shell=True).decode(\"utf-8\")\n\n    match int(func):\n        case 1:\n            show_screen_welcom()\n        case 2:\n            show_screen_ip()\n        case 3:\n            show_screen_time()\n        case 4:\n            show_screen_stats()\n        case 5:\n            show_screen_climate()\n        case 6:\n            show_screen_cpufreq()\n        case 98:\n            cmd = 'echo 1 > \/root\/board\/product\/screen.txt'\n            subprocess.call(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)\n            show_screen_help(\"\u91cd\u542f\u4e86\")\n            cmd = 'reboot'\n            subprocess.call(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)\n        case 99:\n            show_screen_help(\"\u5173\u673a\u4e86\")\n            cmd = 'echo 1 > \/root\/board\/product\/screen.txt'\n            subprocess.call(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)\n            cmd = 'poweroff'\n            subprocess.call(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)\n        case _:\n            show_screen_help(\"\u6307\u4ee4\u4e0d\u652f\u6301\")\n\n    time.sleep(1)<\/code><\/pre>\n\n\n\n<p>\u6700\u540e\uff0c\u6211\u4eec\u628a\u8fd9\u4e24\u4e2a\u7a0b\u5e8f\u53d8\u6210\u5f00\u673a\u542f\u52a8\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/etc\/systemd\/system\nvim oledshow.service<\/code><\/pre>\n\n\n\n<p>\u589e\u52a0\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;Unit]\nDescription=oledshow\n\n&#91;Service]\nExecStart=\/usr\/bin\/python \/root\/board\/product\/oledshow.py\n\n&#91;Install]\nWantedBy=default.target<\/code><\/pre>\n\n\n\n<p>\u7136\u540e\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vim irmscreen.service<\/code><\/pre>\n\n\n\n<p>\u589e\u52a0\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;Unit]\nDescription=irmscreen\n\n&#91;Service]\nExecStart=\/root\/board\/product\/irmscreen\n\n&#91;Install]\nWantedBy=default.target<\/code><\/pre>\n\n\n\n<p>\u8bbe\u7f6e\u670d\u52a1\u5f00\u673a\u81ea\u52a8\u542f\u52a8\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl daemon-reload\n\nsystemctl enable oledshow\nsystemctl start oledshow\n\nsystemctl enable irmscreen\nsystemctl start irmscreen<\/code><\/pre>\n\n\n\n<p>\u7136\u540e\u4f7f\u7528\u9065\u63a7\u5668\u7684\u91cd\u542f\u952e\u91cd\u542f\u673a\u5668\u540e\uff0c\u5c31\u80fd\u6109\u5feb\u5730\u7528\u7528\u9065\u63a7\u5668\u63a7\u5236\u5c4f\u5e55\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1.\u9065\u63a7\u6d4b\u8bd5 \u6269\u5c55\u677f\u4e0a\u6709\u4e2a\u7ea2\u5916\u9065\u63a7\u6a21\u5757\uff1a \u4e3a\u4e86\u6d4b\u8bd5\u8fd9\u4e2a\u6a21\u5757\uff0c\u6211\u628a\u5b69\u5b50\u56fd\u5b66\u673a\u4e0a\u7684\u9065\u63a7\u5668\u62ff\u8fc7\u6765\u4e86\uff08\u5176\u5b9e\u968f\u4fbf\u627e\u4e00\u4e2a\u7ea2\u5916\u9065\u63a7\u5668\u5c31\u884c\uff09\uff1a \u8fd0\u884c\u4e0b\u9762\u7684\u4ee3\u7801\uff1a \u7136\u540e\u968f\u4fbf\u6309\u4e0b\u9065&#8230;<\/p>\n<p class=\"read-more\"><a class=\"btn btn-default\" href=\"http:\/\/www.wangkaixuan.tech\/?p=4331\"> Read More<span class=\"screen-reader-text\">  Read More<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-4331","post","type-post","status-publish","format-standard","hentry","category-03-01-"],"_links":{"self":[{"href":"http:\/\/www.wangkaixuan.tech\/index.php?rest_route=\/wp\/v2\/posts\/4331","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.wangkaixuan.tech\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.wangkaixuan.tech\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.wangkaixuan.tech\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.wangkaixuan.tech\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4331"}],"version-history":[{"count":0,"href":"http:\/\/www.wangkaixuan.tech\/index.php?rest_route=\/wp\/v2\/posts\/4331\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.wangkaixuan.tech\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4331"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.wangkaixuan.tech\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4331"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.wangkaixuan.tech\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4331"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}