{"id":1049,"date":"2021-12-13T19:04:38","date_gmt":"2021-12-13T11:04:38","guid":{"rendered":"https:\/\/www.iotch.xyz\/?p=1049"},"modified":"2021-12-13T19:04:38","modified_gmt":"2021-12-13T11:04:38","slug":"%e6%a0%91%e8%8e%93%e6%b4%be1-44%e5%af%b8%e6%98%be%e7%a4%ba%e5%b1%8f%e4%bd%bf%e7%94%a8%e6%95%99%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/www.iotch.xyz\/?p=1049","title":{"rendered":"\u6811\u8393\u6d3e1.44\u5bf8\u663e\u793a\u5c4f\u4f7f\u7528\u6559\u7a0b"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u529f\u80fd\u5f15\u811a<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>\u529f\u80fd\u5f15\u811a<\/td><td>\u6811\u8393\u6d3e\u63a5\u53e3(BCM)<\/td><td>\u63cf\u8ff0<\/td><\/tr><tr><td>KEY1<\/td><td>P21<\/td><td>\u6309\u952e1GPIO<\/td><\/tr><tr><td>KEY2<\/td><td>P20<\/td><td>\u6309\u952e2GPIO<\/td><\/tr><tr><td>KEY3<\/td><td>P16<\/td><td>\u6309\u952e3GPIO<\/td><\/tr><tr><td>\u6447\u6746UP<\/td><td>P6<\/td><td>\u6447\u6746\u4e0a<\/td><\/tr><tr><td>\u6447\u6746Down<\/td><td>P19<\/td><td>\u6447\u6746\u4e0b<\/td><\/tr><tr><td>\u6447\u6746Left<\/td><td>P5<\/td><td>\u6447\u6746\u5de6<\/td><\/tr><tr><td>\u6447\u6746Right<\/td><td>P26<\/td><td>\u6447\u6746\u53f3<\/td><\/tr><tr><td>\u6447\u6746Press<\/td><td>P13<\/td><td>\u6447\u6746\u6309\u4e0b<\/td><\/tr><tr><td>SCLK<\/td><td>P11\/SCLK<\/td><td>SPI\u65f6\u949f\u7ebf<\/td><\/tr><tr><td>MOSI<\/td><td>P10\/MOSI<\/td><td>SPI\u6570\u636e\u7ebf<\/td><\/tr><tr><td>DC<\/td><td>P25<\/td><td>\u6570\u636e\/\u547d\u4ee4\u9009\u62e9<\/td><\/tr><tr><td>CS<\/td><td>P8\/CE0<\/td><td>\u7247\u9009<\/td><\/tr><tr><td>RST<\/td><td>P27<\/td><td>\u590d\u4f4d<\/td><\/tr><tr><td>BL<\/td><td>P24<\/td><td>\u80cc\u5149<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">LCD \u53ca\u5176\u63a7\u5236\u5668<\/h2>\n\n\n\n<p>ST7735S\u662f\u4e00\u6b3e132*162\u50cf\u7d20\u7684LCD\u63a7\u5236\u5668\uff0c\u800c\u672c\u4ea7\u54c1\u4e3a128*128\u50cf\u7d20\u7684LCD\uff0c\u56e0\u6b64\u5728\u663e\u793a\u4e0a\u505a\u4e86\u4e00\u4e9b\u5904\u7406\uff1a\u6c34\u5e73\u65b9\u5411\u4ece\u7b2c\u4e8c\u4e2a\u50cf\u7d20\u70b9\u5f00\u59cb\u663e\u793a\uff0c\u8fd9\u6837\u5c31\u53ef\u4ee5\u4fdd\u8bc1\u663e\u793a\u7684\u65f6\u5019LCD\u4e2dRAM\u5bf9\u5e94\u7684\u4f4d\u7f6e\u4e0e\u5b9e\u9645\u4f4d\u7f6e\u662f\u4e00\u81f4\u7684\u3002<br>\u8be5LCD\u652f\u630112\u4f4d\uff0c16\u4f4d\u4ee5\u53ca18\u4f4d\u6bcf\u50cf\u7d20\u7684\u8f93\u5165\u989c\u8272\u683c\u5f0f\uff0c\u5373RGB444\uff0cRGB565\uff0cRGB666\u4e09\u79cd\u989c\u8272\u683c\u5f0f\uff0c\u672c\u4f8b\u7a0b\u4f7f\u7528RGB565\u7684\u989c\u8272\u683c\u5f0f\uff0c\u8fd9\u4e5f\u662f\u5e38\u7528\u7684RGB\u683c\u5f0f<br>LCD\u4f7f\u7528\u56db\u7ebfSPI\u901a\u4fe1\u63a5\u53e3\uff0c\u8fd9\u6837\u53ef\u4ee5\u5927\u5927\u7684\u8282\u7701GPIO\u53e3\uff0c\u540c\u65f6\u901a\u4fe1\u662f\u901f\u5ea6\u4e5f\u4f1a\u6bd4\u8f83\u5feb<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u901a\u4fe1\u534f\u8bae<\/h2>\n\n\n\n<p><img decoding=\"async\" src=\"http:\/\/spotpear.cn\/public\/uploads\/picture\/learn\/lcd\/lcd\/lcd-module-spi\/lcd-module-spi-01.png\"><a href=\"https:\/\/www.waveshare.net\/wiki\/File:0.96inch_lcd_module_spi.png\" alt=\"\u6811\u8393\u6d3e1.44\u5bf8\u663e\u793a\u5c4f\u4f7f\u7528\u6559\u7a0b\" title=\"\u6811\u8393\u6d3e1.44\u5bf8\u663e\u793a\u5c4f\u4f7f\u7528\u6559\u7a0b\" target=\"_blank\"  rel=\"nofollow\" ><\/a><br>\u6ce8\uff1a\u4e0e\u4f20\u7edf\u7684SPI\u534f\u8bae\u4e0d\u540c\u7684\u5730\u65b9\u662f\uff1a\u7531\u4e8e\u662f\u53ea\u9700\u8981\u663e\u793a\uff0c\u6545\u800c\u5c06\u4ece\u673a\u53d1\u5f80\u4e3b\u673a\u7684\u6570\u636e\u7ebf\u8fdb\u884c\u4e86\u9690\u85cf\uff0c\u8be5\u8868\u683c\u8be6\u89c1Datasheet Page 66\u3002<br>RESX\u4e3a\u590d\u4f4d\uff0c\u6a21\u5757\u4e0a\u7535\u65f6\u62c9\u4f4e\uff0c\u901a\u5e38\u60c5\u51b5\u4e0b\u7f6e1\uff1b<br>CSX\u4e3a\u4ece\u673a\u7247\u9009\uff0c \u4ec5\u5f53CS\u4e3a\u4f4e\u7535\u5e73\u65f6\uff0c\u82af\u7247\u624d\u4f1a\u88ab\u4f7f\u80fd\u3002<br>D\/CX\u4e3a\u82af\u7247\u7684\u6570\u636e\/\u547d\u4ee4\u63a7\u5236\u5f15\u811a\uff0c\u5f53DC = 0\u65f6\u5199\u547d\u4ee4\uff0c\u5f53DC = 1\u65f6\u5199\u6570\u636e\u3002<br>SDA\u4e3a\u4f20\u8f93\u7684\u6570\u636e\uff0c\u5373RGB\u6570\u636e\u3002<br>SCL\u4e3aSPI\u901a\u4fe1\u65f6\u949f\u3002<br>\u5bf9\u4e8eSPI\u901a\u4fe1\u800c\u8a00\uff0c\u6570\u636e\u662f\u6709\u4f20\u8f93\u65f6\u5e8f\u7684\uff0c\u5373\u65f6\u949f\u76f8\u4f4d\uff08CPHA\uff09\u4e0e\u65f6\u949f\u6781\u6027(CPOL)\u7684\u7ec4\u5408\uff1a<br>CPHA\u7684\u9ad8\u4f4e\u51b3\u5b9a\u4e32\u884c\u540c\u6b65\u65f6\u949f\u662f\u5728\u7b2c\u4e00\u65f6\u949f\u8df3\u53d8\u6cbf\u8fd8\u662f\u7b2c\u4e8c\u4e2a\u65f6\u949f\u8df3\u53d8\u6cbf\u6570\u636e\u88ab\u91c7\u96c6\uff0c\u5f53CPHA = 0\uff0c\u5728\u7b2c\u4e00\u4e2a\u8df3\u53d8\u6cbf\u8fdb\u884c\u6570\u636e\u91c7\u96c6\uff1b<br>CPOL\u7684\u9ad8\u4f4e\u51b3\u5b9a\u4e32\u884c\u540c\u6b65\u65f6\u949f\u7684\u7a7a\u95f2\u72b6\u6001\u7535\u5e73\uff0cCPOL = 0\uff0c\u4e3a\u4f4e\u7535\u5e73\u3002<br>\u4ece\u56fe\u4e2d\u53ef\u4ee5\u770b\u51fa\uff0c\u5f53SCLK\u7b2c\u4e00\u4e2a\u4e0b\u964d\u6cbf\u65f6\u5f00\u59cb\u4f20\u8f93\u6570\u636e\uff0c\u4e00\u4e2a\u65f6\u949f\u5468\u671f\u4f20\u8f938bit\u6570\u636e\uff0c\u4f7f\u7528SPI0\uff0c\u6309\u4f4d\u4f20\u8f93,\u9ad8\u4f4d\u5728\u524d,\u4f4e\u4f4d\u5728\u540e\u3002<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">\u6811\u8393\u6d3e<\/h1>\n\n\n\n<p>\u63d0\u4f9bC\u8bed\u8a00\u4e0epython\u4f8b\u7a0b<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u5f00\u542fSPI\u63a5\u53e3<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>\u6253\u5f00\u6811\u8393\u6d3e\u7ec8\u7aef\uff0c\u8f93\u5165\u4ee5\u4e0b\u6307\u4ee4\u8fdb\u5165\u914d\u7f6e\u754c\u9762<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo raspi-config\u9009\u62e9Interfacing Options -&gt; SPI -&gt; Yes \u5f00\u542fSPI\u63a5\u53e3<\/pre>\n\n\n\n<p><img decoding=\"async\" src=\"http:\/\/spotpear.cn\/public\/uploads\/picture\/learn\/lcd\/lcd\/lcd-module-spi\/lcd-module-spi-02.png\"><a href=\"https:\/\/www.waveshare.net\/wiki\/File:RPI_open_spi.png\" alt=\"\u6811\u8393\u6d3e1.44\u5bf8\u663e\u793a\u5c4f\u4f7f\u7528\u6559\u7a0b\" title=\"\u6811\u8393\u6d3e1.44\u5bf8\u663e\u793a\u5c4f\u4f7f\u7528\u6559\u7a0b\" target=\"_blank\"  rel=\"nofollow\" ><\/a><br>\u7136\u540e\u91cd\u542f\u6811\u8393\u6d3e\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo reboot<\/pre>\n\n\n\n<p>\u8bf7\u786e\u4fddSPI\u6ca1\u6709\u88ab\u5176\u4ed6\u7684\u8bbe\u5907\u5360\u7528\uff0c\u4f60\u53ef\u4ee5\u5728\/boot\/config.txt\u4e2d\u95f4\u68c0\u67e5<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u5b89\u88c5\u5e93<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>\u5b89\u88c5BCM2835\uff0c \u6253\u5f00\u6811\u8393\u6d3e\u7ec8\u7aef\uff0c\u5e76\u8fd0\u884c\u4ee5\u4e0b\u6307\u4ee4<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">wget http:\/\/www.airspayce.com\/mikem\/bcm2835\/bcm2835-1.60.tar.gztar zxvf bcm2835-1.60.tar.gz cd bcm2835-1.60\/sudo .\/configure &amp;&amp; sudo make &amp;&amp; sudo make check &amp;&amp; sudo make install# \u66f4\u591a\u7684\u53ef\u4ee5\u53c2\u8003\u5b98\u7f51\uff1ahttp:\/\/www.airspayce.com\/mikem\/bcm2835\/<\/pre>\n\n\n\n<ul class=\"wp-block-list\"><li>\u5b89\u88c5wiringPi<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo apt-get install wiringpi#\u5bf9\u4e8e\u6811\u8393\u6d3e2019\u5e745\u6708\u4e4b\u540e\u7684\u7cfb\u7edf\uff08\u65e9\u4e8e\u4e4b\u524d\u7684\u53ef\u4e0d\u7528\u6267\u884c\uff09\uff0c\u53ef\u80fd\u9700\u8981\u8fdb\u884c\u5347\u7ea7\uff1awget https:\/\/project-downloads.drogon.net\/wiringpi-latest.debsudo dpkg -i wiringpi-latest.debgpio -v# \u8fd0\u884cgpio -v\u4f1a\u51fa\u73b02.52\u7248\u672c\uff0c\u5982\u679c\u6ca1\u6709\u51fa\u73b0\u8bf4\u660e\u5b89\u88c5\u51fa\u9519<\/pre>\n\n\n\n<ul class=\"wp-block-list\"><li>python<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo apt-get updatesudo apt-get install python-pip sudo pip install RPi.GPIOsudo pip install spidev<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e0b\u8f7d\u4f8b\u7a0b<\/h2>\n\n\n\n<p>\u5728\u6811\u8393\u6d3e\u7ec8\u7aef\u8fd0\u884c\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">apt-get install p7zip-fullwget http:\/\/www.waveshare.net\/w\/upload\/f\/fa\/1.44inch-LCD-HAT-Code.7z7z x 1.44inch-LCD-HAT-Code.7zsudo chmod 777 -R 1.44inch-LCD-HAT-Codecd 1.44inch-LCD-HAT-Code\/RaspberryPi\/<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u8fd0\u884c\u6d4b\u8bd5\u7a0b\u5e8f<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>C\u8bed\u8a00<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">cd cmake cleanmakesudo .\/main<\/pre>\n\n\n\n<ul class=\"wp-block-list\"><li>\u5bf9\u4e8e\u6811\u8393\u6d3e4B\u53caraspbian_lite-2019-06-20\u7cfb\u7edf\u4e4b\u540e\u9700\u8981\u8bbe\u7f6e\u5982\u4e0b\uff0c\u6309\u952e\u624d\u80fd\u6b63\u5e38\u8f93\u5165<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo nano \/boot\/config.txt#\u6dfb\u52a0\u5982\u4e0b\uff1agpio=6,19,5,26,13,21,20,16=pu<\/pre>\n\n\n\n<ul class=\"wp-block-list\"><li>python<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">cd pythonsudo python main.pysudo python key_demo.py<\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">fbtft\u79fb\u690d<\/h1>\n\n\n\n<p>Framebuffer \u662f\u7528\u4e00\u4e2a\u89c6\u9891\u8f93\u51fa\u8bbe\u5907\u4ece\u5305\u542b\u5b8c\u6574\u7684\u5e27\u6570\u636e\u7684\u4e00\u4e2a\u5185\u5b58\u7f13\u51b2\u533a\u4e2d\u6765\u9a71\u52a8\u4e00\u4e2a\u89c6\u9891\u663e\u793a\u8bbe\u5907\u3002\u7b80\u5355\u7684\u6765\u8bf4\uff0c\u5c31\u662f\u4f7f\u7528\u4e00\u4e2a\u5185\u5b58\u533a\u6765\u5b58\u50a8\u663e\u793a\u5185\u5bb9\uff0c\u6539\u53d8\u5185\u5b58\u7684\u6570\u636e\u5c31\u53ef\u4ee5\u6539\u53d8\u663e\u793a\u7684\u5185\u5bb9\u3002<br>\u5728 github \u4e0a\u6709\u4e00\u4e2a\u5f00\u6e90\u5de5\u7a0b\uff1a<a rel=\"noreferrer noopener\" target=\"_blank\" href=\"https:\/\/github.com\/notro\/fbtft\" rel=\"nofollow\" >https:\/\/github.com\/notro\/fbtft<\/a>&nbsp;\uff0c\u5b8c\u6574\u7684\u5b9e\u73b0\u4e86framebuffer\u9a71\u52a8\uff0c\u8ba9\u6811\u8393\u6d3e\u5b8c\u7f8e\u652f\u6301 tft \u6db2\u6676\u3002\u4e0b\u9762\u6765\u4ecb\u7ecd\u4e00\u4e0b\u5982\u4f55\u4f7f\u7528 fbtft \u9a71\u52a8 1.44inch LCD HAT.<br>\u6253\u5f00\u7f16\u8f91\u914d\u7f6e\u6587\u4ef6\uff0c\u542f\u7528\u4e00\u4e9b\u6a21\u5757<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo nano \/etc\/modules#\u6dfb\u52a0\u5982\u4e0b\uff1aspi-bcm2835fbtft_device<\/pre>\n\n\n\n<p>\u6dfb\u52a0\u7b2c\u4e00\u884c\u662f\u786e\u4fdd\u5c4f\u5e55\u7684 SPI \u5df2\u7ecf\u542f\u52a8\u5e76\u6b63\u5728\u8fd0\u884c\uff0c\u7b2c\u4e8c\u4e2a\u547d\u4ee4\u5b9e\u9645\u662f\u542f\u52a8 fbtft \u6a21\u5757\u3002<br>\u65b0\u5efa\u53e6\u5916\u4e00\u4e2a\u914d\u7f6e\u6587\u4ef6\uff0c\u914d\u7f6e fbtft<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo nano \/etc\/modprobe.d\/fbtft.conf<\/pre>\n\n\n\n<p>\u5c06\u4e0b\u9762\u8bed\u53e5\u6dfb\u52a0\u5230\u65b0\u5efa\u7684\u7a7a\u767d\u6587\u4ef6\u4e2d\uff0c<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">options fbtft_device name=adafruit18_green gpios=reset:27,dc:25,cs:8,led:24 speed=40000000 bgr=1 fps=60 custom=1 height=128 width=128 rotate=180<\/pre>\n\n\n\n<p>\u8fd9\u91cc\u9700\u8981\u6ce8\u610f\u4e00\u4e0b\uff0cname \u9700\u8981\u6839\u636e\u5c4f\u5e55\u7684\u4e3b\u63a7\u82af\u7247\u578b\u53f7\u9009\u62e9\uff0c1.44inch LCD HAT \u7684\u4e3b\u63a7\u82af\u7247\u662f ST7735s\u3002fbtft \u662f\u652f\u6301\u8fd9\u4e2a\u578b\u53f7\u7684\u3002\u8fd9\u91cc\u9009\u62e9 adafruit18_green\uff0c\u56e0\u4e3a\u82af\u7247\u662f\u548c\u8fd9\u4e2a\u4e00\u6837\u7684\u3002<br>gpios=reset:27,dc:25,cs:8,led:24 \u8fd9\u4e2a\u8bbe\u7f6e\u5c4f\u5e55\u5bf9\u5e94\u7684\u5f15\u811a\uff0c\u8fd9\u4e2a\u6839\u636e\u677f\u5b50\u7684\u539f\u7406\u56fe\u8bbe\u7f6e\u3002<br>height=128 width=128 rotate=180 \u8bbe\u7f6e\u5c4f\u5e55\u5206\u8fa8\u7387\u5927\u5c0f\u548c\u663e\u793a\u65b9\u5411\u3002<br>\u6b64\u65f6\u91cd\u542f\u4e00\u4e0b\u6811\u8393\u6d3e.\u5982\u679c\u5c4f\u5e55\u663e\u793a\u5168\u9ed1\u5219\u5c4f\u5e55\u5df2\u7ecf\u5de5\u4f5c\u4e86\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo reboot<\/pre>\n\n\n\n<p>\u67e5\u770b\u8bbe\u5907\u53ef\u4ee5\u53d1\u73b0\u591a\u4e86\u4e00\u4e2a fb1 \u8bbe\u5907\uff0c\u5219\u8bf4\u660e\u8bbe\u5907\u5df2\u7ecf\u6210\u529f\u542f\u52a8\u4e86<br><img decoding=\"async\" src=\"http:\/\/spotpear.cn\/public\/uploads\/picture\/learn\/lcd\/lcd\/lcd-module-spi\/lcd-module-spi-03.png\"><a href=\"https:\/\/www.waveshare.net\/wiki\/File:1in3_lcd_fb.png\" alt=\"\u6811\u8393\u6d3e1.44\u5bf8\u663e\u793a\u5c4f\u4f7f\u7528\u6559\u7a0b\" title=\"\u6811\u8393\u6d3e1.44\u5bf8\u663e\u793a\u5c4f\u4f7f\u7528\u6559\u7a0b\" target=\"_blank\"  rel=\"nofollow\" ><\/a><br>\u6ce8\u610f\uff0c\u5982\u679c\u4f60\u7684\u7cfb\u7edf\u662f\u547d\u4ee4\u884c\u754c\u9762\u7684\uff0c\u5219\u53ea\u4f1a\u51fa\u73b0fb0<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u663e\u793a\u7528\u6237\u754c\u9762<\/h2>\n\n\n\n<p>\u6700\u540e\u6211\u4eec\u5c06\u7528\u6237\u754c\u9762\u5230 1.44inch LCD HAT \u4e0a\uff0c\u867d\u7136\u8fd9\u4e2a\u5c4f\u5e55\u53ea\u6709 128x128 \u5206\u8fa8\u7387\uff0c\u6211\u4eec\u8fd8\u662f\u8bd5\u4e00\u4e0b\u5c06\u7528\u6237\u754c\u9762\u663e\u793a\u5230\u5c4f\u5e55\u4e0a\u770b\u4e0b\u6709\u4ec0\u4e48\u6837\u7684\u6548\u679c\u3002<br>\u663e\u793a\u7528\u6237\u754c\u9762\u53ea\u9700\u5c06 fb0 \u4e0a\u7684\u5185\u5bb9\u76f4\u63a5\u62f7\u8d1d\u5230 fb1 \u4e0a\uff0cfb0 \u548c fb1 \u540c\u6b65\u3002<br>\u9996\u5148\u5b89\u88c5\u4e00\u4e0b\u5de5\u5177\u8f6f\u4ef6<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo apt-get install cmake git<\/pre>\n\n\n\n<p>\u4f7f\u7528 github \u4e0a\u7684\u5f00\u6e90\u4ee3\u7801\u6765\u5b9e\u73b0\u8fd9\u4e2a\u529f\u80fd\uff0c\u4e0b\u8f7d\u4ee3\u7801\u5e76\u5b89\u88c5\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cd ~git clone https:\/\/github.com\/tasanakorn\/rpi-fbcpcd rpi-fbcp\/mkdir buildcd build\/cmake ..makesudo install fbcp \/usr\/local\/bin\/fbcp<\/pre>\n\n\n\n<p>\u8bbe\u7f6e\u5f00\u673a\u542f\u52a8\u3002\u5728<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo nano \/etc\/rc.local<\/pre>\n\n\n\n<p>\u8bbe\u7f6e\u5f00\u673a\u542f\u52a8\u3002\u5728 exit 0 \u524d\u9762\u6dfb\u52a0 fbcp&amp;.<br>\u6ce8\u610f\u4e00\u5b9a\u8981\u6dfb\u52a0\"&amp;\" \u540e\u53f0\u8fd0\u884c\uff0c\u5426\u5219\u53ef\u80fd\u4f1a\u51fa\u73b0\u7cfb\u7edf\u4e0d\u80fd\u542f\u52a8\u7684\u60c5\u51b5\u3002<br><img decoding=\"async\" src=\"http:\/\/spotpear.cn\/public\/uploads\/picture\/learn\/lcd\/lcd\/lcd-module-spi\/lcd-module-spi-04.png\"><a href=\"https:\/\/www.waveshare.net\/wiki\/File:1in3_lcd_fb5.png\" alt=\"\u6811\u8393\u6d3e1.44\u5bf8\u663e\u793a\u5c4f\u4f7f\u7528\u6559\u7a0b\" title=\"\u6811\u8393\u6d3e1.44\u5bf8\u663e\u793a\u5c4f\u4f7f\u7528\u6559\u7a0b\" target=\"_blank\"  rel=\"nofollow\" ><\/a><br>\u6700\u540e\u5728\/boot\/config.txt \u6587\u4ef6\u4e2d\u8bbe\u7f6e\u7528\u6237\u754c\u9762\u663e\u793a\u5c3a\u5bf8\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo vi \/boot\/config.txt#\u6dfb\u52a0hdmi_force_hotplug=1hdmi_cvt=128 128 60 1 0 0 0hdmi_group=2hdmi_mode=1hdmi_mode=87display_rotate=1<\/pre>\n\n\n\n<p>\u542f\u52a8\u6811\u8393\u6d3e\u540e\u53ef\u4ee5\u53d1\u73b0\u5c4f\u5e55\u5df2\u7ecf\u51fa\u73b0\u7528\u6237\u754c\u9762\u4e86\u3002\u6700\u540e\u663e\u793a\u6548\u679c\u56fe\u3002<br><img decoding=\"async\" src=\"http:\/\/spotpear.cn\/public\/uploads\/picture\/learn\/lcd\/lcd\/1.44inch-lcd-hat\/1.44inch-lcd-hat-01.png\"><a href=\"https:\/\/www.waveshare.net\/wiki\/File:1in3_lcd_fb6.png\" alt=\"\u6811\u8393\u6d3e1.44\u5bf8\u663e\u793a\u5c4f\u4f7f\u7528\u6559\u7a0b\" title=\"\u6811\u8393\u6d3e1.44\u5bf8\u663e\u793a\u5c4f\u4f7f\u7528\u6559\u7a0b\" target=\"_blank\"  rel=\"nofollow\" ><\/a><br>\u5982\u679c\u5c4f\u5e55\u95ea\u70c1\u6216\u8005\u51fa\u73b0\u82b1\u5c4f\uff0c\u53ef\u4ee5\u5728\/boot\/config.txt\u4e2d\u6dfb\u52a0\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">enable_uart=1<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u6a21\u62df\u9f20\u6807<\/h2>\n\n\n\n<p>\u6a21\u5757\u4e0a\u9762\u677f\u5b50\u4e00\u4e2a\u6447\u6746\u548c\u4e09\u4e2a\u6309\u952e\uff0c\u6211\u4eec\u53ef\u4ee5\u7528\u6765\u63a7\u5236\u6811\u8393\u6d3e\u7684\u9f20\u6807<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\u5b89\u88c5\u5e93\u5e76\u4e0b\u8f7d\u5e76\u8fd0\u884c\u4f8b\u7a0b<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo apt-get install python-xlibsudo pip install PyMousewget http:\/\/www.waveshare.net\/w\/upload\/d\/d3\/Mouse.7z7z x Mouse.7zsudo python mouse.py<\/pre>\n\n\n\n<ul class=\"wp-block-list\"><li>\u8be5\u547d\u4ee4\u65e0\u6cd5\u5728\u547d\u4ee4\u884c\u754c\u9762\u8fd0\u884c\u3002\u5bf9\u4e8e\u6811\u8393\u6d3e4B\u53caraspbian_lite-2019-06-20\u7cfb\u7edf\u4e4b\u540e\u9700\u8981\u8bbe\u7f6e\u5982\u4e0b\uff0c\u6309\u952e\u624d\u80fd\u6b63\u5e38\u8f93\u5165<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo nano \/boot\/config.txt#\u6dfb\u52a0\u5982\u4e0b\uff1agpio=6,19,5,26,13,21,20,16=pu<\/pre>\n\n\n\n<p><strong>\u4f7f\u7528\u6447\u6746\u4e0a\u4e0b\u5de6\u53f3\uff0c\u5c31\u53ef\u4ee5\u770b\u5230\u9f20\u6807\u5728\u52a8\u4e86\u3002<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\u914d\u7f6e\u6210\u5f00\u673a\u81ea\u542f<\/li><\/ul>\n\n\n\n<p>\u6ce8\u610f\u4e0d\u8981\u52a0\u5230\/etc\/rc.local\u4e2d\uff0c\u56e0\u4e3arc.local\u5728\u7cfb\u7edf\u8fd8\u6ca1\u6709\u8fdb\u5165\u684c\u9762\u4e4b\u524d\u4f1a\u6267\u884c\uff0c\u800cPyMouse\u6a21\u5757\u5728\u547d\u4ee4\u884c\u754c\u9762\u8fd0\u884c\u7684\u8bdd\u4f1a\u62a5\u9519\u6ca1\u6709\u9f20\u6807\u8fd9\u4e2a\u4e8b\u4ef6\uff0c\u6240\u4ee5\u6211\u4eec\u9700\u8981\u6267\u884c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cd .config\/mkdir autostartcd autostart\/sudo nano local.desktop<\/pre>\n\n\n\n<p>\u52a0\u5165\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[Desktop Entry]Type=ApplicationExec=python \/home\/pi\/mouse.py<\/pre>\n\n\n\n<p>\u7136\u540e\u91cd\u65b0\u542f\u52a8\u6811\u8393\u6d3e\uff0c\u5373\u53ef\u4f7f\u7528\u6309\u952e\u63a7\u5236\u9f20\u6807\u4e86\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u663e\u793a\u5c4f\u5e55\u5e38\u4eae<\/h2>\n\n\n\n<p>\u6253\u5f00 lightdm.conf<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo vi \/etc\/lightdm\/lightdm.conf<\/pre>\n\n\n\n<p>\u4fee\u6539 lightdm.conf \u627e\u5230[SeatDefaults]\u6bb5\u4e0b\u7684\u2019xserver-command\u2019,\u53d6\u6d88\u6ce8\u91ca,\u4fee\u6539\u4e3a\u5982\u4e0b:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#xserver-command=X<\/pre>\n\n\n\n<p>\u4fee\u6539\u4e3a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">xserver-command=X -s 0 -dpms<\/pre>\n\n\n\n<ul class=\"wp-block-list\"><li>-s # \u2013\u8bbe\u7f6e\u5c4f\u5e55\u4fdd\u62a4\u4e0d\u542f\u7528<\/li><li>dpms \u5173\u95ed\u7535\u6e90\u8282\u80fd\u7ba1\u7406<\/li><\/ul>\n\n\n\n<p>\u91cd\u542f<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo reboot\n<\/pre>\n\n\n\n<pre id=\"block-7c2e7c9f-a76d-42e7-900a-7f9acc8239f6\" class=\"wp-block-preformatted\">\u539f\u6587\u5730\u5740\uff1a<a href=\"http:\/\/spotpear.cn\/public\/index\/study\/detail\/id\/133.html\" target=\"_blank\" rel=\"noreferrer noopener\" rel=\"nofollow\" >http:\/\/spotpear.cn\/public\/index\/study\/detail\/id\/133.html<\/a><\/pre>\n<button class=\"simplefavorite-button\" data-postid=\"1049\" data-siteid=\"1\" data-groupid=\"1\" data-favoritecount=\"0\" style=\"\">\u6536\u85cf <i class=\"sf-icon-star-empty\"><\/i><\/button>","protected":false},"excerpt":{"rendered":"<p>\u529f\u80fd\u5f15\u811a \u529f\u80fd\u5f15\u811a \u6811\u8393\u6d3e\u63a5\u53e3(BCM) \u63cf\u8ff0 KEY1 P21 \u6309\u952e1GPIO KEY2 P20 \u6309\u952e2GPIO KEY3 P1 &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-1049","post","type-post","status-publish","format-standard","hentry","category-10"],"_links":{"self":[{"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=\/wp\/v2\/posts\/1049","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1049"}],"version-history":[{"count":0,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=\/wp\/v2\/posts\/1049\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1049"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1049"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1049"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}