{"id":14593,"date":"2022-04-27T14:07:55","date_gmt":"2022-04-27T06:07:55","guid":{"rendered":"https:\/\/www.circuspi.com\/?p=14593"},"modified":"2022-05-20T15:22:44","modified_gmt":"2022-05-20T07:22:44","slug":"pixelbit-unit2","status":"publish","type":"post","link":"https:\/\/www.circuspi.com\/index.php\/2022\/04\/27\/pixelbit-unit2\/","title":{"rendered":"Pixel:Bit \u6559\u5b78(\u4e8c) &#8211; ESP32 \u8207 ATmega328P \u7684 UART \u901a\u8a0a"},"content":{"rendered":"\n<p><style>\n\/* ###\u5be6\u9a57\u4e0b\u4e00\u5217### *\/\n\na:link {color:#0695e4\n;}    \/* \u8a2d\u5b9a\u5c1a\u672a\u9ede\u95b1\u904e\u7684\u9023\u7d50\u6a23\u5f0f *\/\na:visited {color:#0695e4\n;} \/* \u8a2d\u5b9a\u904e\u53bb\u66fe\u7d93\u95b1\u904e\u7684\u9023\u7d50 *\/\na:hover {color:#0695e4\n;}   \/* \u8a2d\u5b9a\u6ed1\u9f20\u6e38\u6a19\u6307\u5728\u9023\u7d50\u4f4d\u7f6e\u4e0a\u7684\u6a23\u5f0f *\/\na:active {color:#0000BB;}  \/* \u8a2d\u5b9a\u4e0a\u9ede\u64ca\u904e\u7684\u9023\u7d50\u6a23\u5f0f *\/\n<\/style><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1000\" height=\"526\" src=\"https:\/\/www.circuspi.com\/wp-content\/uploads\/2022\/05\/0511_1000x526.jpg\" alt=\"\" class=\"wp-image-15439\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e00\u3001\u7c21\u4ecb<\/h2>\n\n\n\n<p>\u9019\u500b\u55ae\u5143\u6211\u5011\u5c07\u5e36\u9818\u5927\u5bb6\u76f4\u63a5\u5be6\u4f5c\u5982\u4f55\u5c07\u7a0b\u5f0f\u5206\u5225\u71d2\u9304\u5230 ESP32 \u8207 ATmega328P\uff0c\u4e26\u5b78\u7fd2\u5982\u4f55\u8b93\u5169\u9846\u5fae\u63a7\u5236\u5668\u76f8\u4e92\u901a\u8a0a\u3002\u9664\u4e86\u57fa\u790e\u6559\u5b78\u4e4b\u5916\uff0c\u4e5f\u6703\u6559\u5927\u5bb6\u4f7f\u7528\u6b63\u9762\u7684 LCD \u4f86\u986f\u793a\u63a5\u6536\u5230\u7684\u8cc7\u8a0a\u3002\u82e5\u60a8\u662f\u5165\u9580\u7684\u521d\u5b78\u8005\uff0c\u5b8c\u5168\u4e0d\u7528\u64d4\u5fc3\u770b\u4e0d\u61c2\uff0c\u56e0\u70ba\u6211\u5011\u6703\u5f9e\u74b0\u5883\u5efa\u7f6e\u958b\u59cb\uff0c\u4ee5\u5faa\u5e8f\u6f38\u9032\u7684\u65b9\u5f0f\uff0c\u4f7f\u5927\u5bb6\u5b8c\u6210\u9019\u500b\u55ae\u5143\u7684\u76ee\u6a19\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e8c\u3001\u6240\u9700\u8a2d\u5099<\/h2>\n\n\n\n<p>1. Pixel:Bit<\/p>\n\n\n\n<p>2. Micro USB to USB Type-A \u6578\u64da\u50b3\u8f38\u7dda<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e09\u3001\u74b0\u5883\u5efa\u7f6e<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. \u5b89\u88dd\u8edf\u9ad4<\/h3>\n\n\n\n<p>\u9996\u5148\u662f\u5b89\u88dd Arduino IDE\uff0c\u8acb\u958b\u555f\u700f\u89bd\u5668\u641c\u5c0b <a href=\"https:\/\/www.arduino.cc\/\" target=\"_blank\" rel=\"noreferrer noopener\">Arduino<\/a>\uff0c\u6216\u662f\u900f\u904e<a href=\"https:\/\/www.arduino.cc\/en\/software\" target=\"_blank\" rel=\"noreferrer noopener\">\u9023\u7d50<\/a>\uff0c\u9032\u5230\u5b98\u65b9\u7db2\u7ad9\u7684 Downloads \u9801\u9762\uff0c\u4f9d\u7167\u60a8\u7684\u4f5c\u696d\u7cfb\u7d71\u4e0b\u8f09\u5c0d\u61c9\u7684Arduino IDE\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.circuspi.com\/wp-content\/uploads\/2022\/04\/01-2.jpg\" alt=\"Pixel:Bit \u6559\u5b78(\u4e8c) - ESP32 \u8207 ATmega328P \u7684 UART \u901a\u8a0a\" class=\"wp-image-14899\" width=\"680\" height=\"365\"\/><\/figure><\/div>\n\n\n\n<p>\u4e0a\u5716\u4ee5 Windows \u7684\u96fb\u8166\u70ba\u4f8b\uff0c\u9078\u64c7\u300cWindows Win 7 and newer\u300d\uff0c\u9032\u5230\u9801\u9762\u5f8c\uff0c\u9ede\u9078\u300cJUST DOWNLOAD\u300d\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.circuspi.com\/wp-content\/uploads\/2022\/04\/02-3.jpg\" alt=\"Pixel:Bit \u6559\u5b78(\u4e8c) - ESP32 \u8207 ATmega328P \u7684 UART \u901a\u8a0a\" class=\"wp-image-14900\" width=\"680\" height=\"284\"\/><\/figure><\/div>\n\n\n\n<p>\u5b89\u88dd\u6b65\u9a5f\u76f8\u7576\u7c21\u55ae\uff0c\u958b\u555f\u525b\u525b\u4e0b\u8f09\u7684\u5b89\u88dd\u6a94\uff0c\u4e00\u76f4\u9ede\u4e0b\u4e00\u6b65\u5373\u53ef\uff0c\u5b8c\u6210\u5f8c\u6253\u958b\u5b89\u88dd\u597d\u7684 Arduino\uff0c\u5373\u53ef\u770b\u5230\u4e0b\u65b9\u7684\u8996\u7a97\u756b\u9762\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.circuspi.com\/wp-content\/uploads\/2022\/04\/03-2.jpg\" alt=\"Pixel:Bit \u6559\u5b78(\u4e8c) - ESP32 \u8207 ATmega328P \u7684 UART \u901a\u8a0a\" class=\"wp-image-14901\" width=\"680\" height=\"421\"\/><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">2. \u5efa\u7f6e ESP32 \u958b\u767c\u74b0\u5883<\/h3>\n\n\n\n<p>\u56e0\u70ba Arduino IDE \u9810\u8a2d\u662f\u7d66 Arduino \u76f8\u95dc\u958b\u767c\u677f\u4f7f\u7528\u7684\uff0c\u82e5\u662f\u8981\u8b93 ESP32 \u4e5f\u80fd\u4f7f\u7528 Arduino IDE\uff0c\u5fc5\u9808\u70ba ESP32 \u5efa\u7f6e\u53ef\u4ee5\u5728 Arduino IDE \u4e0a\u9762\u958b\u767c\u7684\u76f8\u95dc\u8a2d\u5b9a\u3002<\/p>\n\n\n\n<p>\u9996\u5148\u9ede\u9078\u5de6\u4e0a\u89d2\u7684\u300c\u6a94\u6848\u300d\u4e26\u9078\u64c7\u300c\u504f\u597d\u8a2d\u5b9a\u300d\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/www.circuspi.com\/wp-content\/uploads\/2022\/04\/04-2.jpg\" alt=\"Pixel:Bit \u6559\u5b78(\u4e8c) - ESP32 \u8207 ATmega328P \u7684 UART \u901a\u8a0a\" class=\"wp-image-14902\" width=\"680\"\/><\/figure><\/div>\n\n\n\n<p>\u63a5\u8457\u5c07\u9023\u7d50\u300c<strong>https:\/\/dl.espressif.com\/dl\/package_esp32_index.json<\/strong>\u300d\u586b\u5165\u300c\u984d\u5916\u7684\u958b\u767c\u677f\u7ba1\u7406\u54e1\u7db2\u5740\uff1a\u300d\u5f8c\u65b9\u7684\u7a7a\u683c\u4e2d\uff0c\u4e26\u6309\u4e0b\u300c\u78ba\u5b9a\u300d\u6309\u9215\u3002\u9019\u500b\u6b65\u9a5f\u662f\u65b0\u589e ESP32 \u958b\u767c\u677f\u7684\u4e0b\u8f09\u8def\u5f91\uff0c\u70ba\u4e86\u8b93 Arduino IDE \u53ef\u4ee5\u641c\u5c0b\u5230\u5b89\u88dd\u6a94\u6848\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.circuspi.com\/wp-content\/uploads\/2022\/04\/05-2.jpg\" alt=\"Pixel:Bit \u6559\u5b78(\u4e8c) - ESP32 \u8207 ATmega328P \u7684 UART \u901a\u8a0a\" class=\"wp-image-14903\" width=\"680\" height=\"366\"\/><\/figure><\/div>\n\n\n\n<p>\u4e0b\u4e00\u6b65\u9ede\u9078\u300c\u5de5\u5177\u300d\uff1e\u300c\u958b\u767c\u677f\uff1a\uff02Arduino Uno\uff02\u300d\uff1e\u300c\u958b\u767c\u677f\u7ba1\u7406\u54e1&#8230;\u300d\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/www.circuspi.com\/wp-content\/uploads\/2022\/04\/06-2.jpg\" alt=\"Pixel:Bit \u6559\u5b78(\u4e8c) - ESP32 \u8207 ATmega328P \u7684 UART \u901a\u8a0a\" class=\"wp-image-14904\" width=\"680\"\/><\/figure><\/div>\n\n\n\n<p>\u8acb\u5728\u4e0a\u65b9\u641c\u5c0b\u6b04\u5c0b\u627e\u300cESP32\u300d\uff0c\u4e26\u9ede\u9078\u300c\u5b89\u88dd\u300d\u6309\u9215\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/www.circuspi.com\/wp-content\/uploads\/2022\/04\/07-1.jpg\" alt=\"Pixel:Bit \u6559\u5b78(\u4e8c) - ESP32 \u8207 ATmega328P \u7684 UART \u901a\u8a0a\" class=\"wp-image-14905\" width=\"680\"\/><\/figure><\/div>\n\n\n\n<p>\u5b89\u88dd\u5b8c\u6210\u5f8c\u5c31\u80fd\u5728\u958b\u767c\u677f\u7684\u9078\u9805\u4e0a\u627e\u5230\u300cESP32 Arduino\u300d\uff0c\u63a5\u4e0b\u4f86\u5c31\u80fd\u5728 Arduino IDE \u4e0a\u9762\u4f7f\u7528 ESP32 \u4e86\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/www.circuspi.com\/wp-content\/uploads\/2022\/04\/08-2.jpg\" alt=\"Pixel:Bit \u6559\u5b78(\u4e8c) - ESP32 \u8207 ATmega328P \u7684 UART \u901a\u8a0a\" class=\"wp-image-14906\" width=\"680\"\/><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">3. \u5b89\u88dd Pixel:Bit \u9700\u8981\u7684\u7a0b\u5f0f\u5eab<\/h3>\n\n\n\n<p>\u5728 Pixel:Bit \u4e0a\u9762\u6709\u4e00\u4e9b\u5143\u4ef6\u548c\u6a21\u7d44\uff0c\u9700\u8981\u984d\u5916\u5b89\u88dd\u7a0b\u5f0f\u5eab\u624d\u80fd\u6b63\u5e38\u4f7f\u7528\u5b83\u5011\u3002\u8acb\u9ede\u9078\u300c<a href=\"https:\/\/github.com\/CIRCUSPi\/tca5405\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/github.com\/CIRCUSPi\/tca5405<\/a>\u300d\u3001\u300c<a href=\"https:\/\/github.com\/CIRCUSPi\/TFT_eSPI\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/github.com\/CIRCUSPi\/TFT_eSPI<\/a>\u300d\u7db2\u5740\u4e0b\u8f09\u5169\u500b\u5fc5\u9808\u7684\u7a0b\u5f0f\u5eab\u3002<\/p>\n\n\n\n<p>\u4e0b\u8f09\u65b9\u5f0f\u76f8\u7576\u7c21\u55ae\uff0c\u9032\u5230\u9801\u9762\u5f8c\u53ef\u4ee5\u770b\u5230\u300cCode\u300d\u6309\u9215\uff0c\u9ede\u9078\u5f8c\u9078\u64c7\u300cDownload ZIP\u300d\u5c31\u80fd\u5c07\u6a94\u6848\u6574\u500b\u4e0b\u8f09\u4e0b\u4f86\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.circuspi.com\/wp-content\/uploads\/2022\/04\/09-1.jpg\" alt=\"Pixel:Bit \u6559\u5b78(\u4e8c) - ESP32 \u8207 ATmega328P \u7684 UART \u901a\u8a0a\" class=\"wp-image-14907\" width=\"680\" height=\"473\"\/><\/figure><\/div>\n\n\n\n<p>\u9019\u4e9b\u7a0b\u5f0f\u5eab\u7121\u6cd5\u8207\u76f8\u4f3c\u7684\u7a0b\u5f0f\u5eab\u76f8\u5bb9\uff0c\u8acb\u78ba\u5be6\u4e0b\u8f09\u9019\u5169\u500b\u7a0b\u5f0f\u5eab\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"625\" height=\"348\" src=\"https:\/\/www.circuspi.com\/wp-content\/uploads\/2022\/04\/10.jpg\" alt=\"Pixel:Bit \u6559\u5b78(\u4e8c) - ESP32 \u8207 ATmega328P \u7684 UART \u901a\u8a0a\" class=\"wp-image-14908\"\/><\/figure><\/div>\n\n\n\n<p>\u63a5\u8457\u56de\u5230Arduino IDE\uff0c\u9ede\u9078\u300c\u8349\u7a3f\u78bc\u300d\uff1e\u300c\u532f\u5165\u7a0b\u5f0f\u5eab\u300d\uff1e\u300c\u52a0\u5165.ZIP\u7a0b\u5f0f\u5eab&#8230;\u300d\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"685\" height=\"375\" src=\"https:\/\/www.circuspi.com\/wp-content\/uploads\/2022\/04\/11.jpg\" alt=\"Pixel:Bit \u6559\u5b78(\u4e8c) - ESP32 \u8207 ATmega328P \u7684 UART \u901a\u8a0a\" class=\"wp-image-14909\"\/><\/figure><\/div>\n\n\n\n<p>\u8acb\u627e\u5230\u525b\u525b\u4e0b\u8f09\u7684\u7a0b\u5f0f\u5eab\u4e26\u6309\u4e0b\u300c\u958b\u555f\u300d\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/www.circuspi.com\/wp-content\/uploads\/2022\/04\/12-1.jpg\" alt=\"Pixel:Bit \u6559\u5b78(\u4e8c) - ESP32 \u8207 ATmega328P \u7684 UART \u901a\u8a0a\" class=\"wp-image-14910\" width=\"680\"\/><\/figure><\/div>\n\n\n\n<p>\u6210\u529f\u7684\u8a71\uff0c\u5c31\u6703\u5728\u8a0a\u606f\u6b04\u4e0a\u65b9\u770b\u5230\u300c\u5df2\u52a0\u5165\u7a0b\u5f0f\u5eab\uff0c\u8acb\u6aa2\u67e5&#8230;\u300d<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"641\" height=\"457\" src=\"https:\/\/www.circuspi.com\/wp-content\/uploads\/2022\/04\/13.jpg\" alt=\"Pixel:Bit \u6559\u5b78(\u4e8c) - ESP32 \u8207 ATmega328P \u7684 UART \u901a\u8a0a\" class=\"wp-image-14911\"\/><\/figure><\/div>\n\n\n\n<p>\u8acb\u4f9d\u7167\u4e0a\u65b9\u300c\u52a0\u5165.ZIP\u7a0b\u5f0f\u5eab&#8230;\u300d\u6b65\u9a5f\u518d\u65b0\u589e\u300c\u53e6\u4e00\u500b\u7a0b\u5f0f\u5eab\u300d\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u56db\u3001\u7bc4\u4f8b\u7a0b\u5f0f\u4e0b\u8f09<\/h2>\n\n\n\n<p>\u70ba\u4e86\u65b9\u4fbf\u5927\u5bb6\u5b78\u7fd2\uff0c\u6211\u5011\u5148\u4e0b\u8f09\u9019\u500b\u55ae\u5143\u6703\u7528\u5230\u7684<a href=\"https:\/\/github.com\/CIRCUSPi\/PixelBit_Example\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>\u7bc4\u4f8b\u7a0b\u5f0f<\/strong><\/a>\u3002\u8207\u525b\u525b\u4e0b\u8f09\u7a0b\u5f0f\u5eab\u4e00\u6a23\uff0c\u770b\u5230\u300cCode\u300d\u6309\u9215\uff0c\u9ede\u9078\u5f8c\u9078\u64c7\u300cDownload ZIP\u300d\u5c31\u80fd\u5c07\u6a94\u6848\u6574\u500b\u4e0b\u8f09\u4e0b\u4f86\u3002<\/p>\n\n\n\n<p>\u89e3\u58d3\u7e2e\u5f8c\uff0c\u9019\u500b\u55ae\u5143\u7684\u6240\u6709\u7bc4\u4f8b\u7a0b\u5f0f\uff0c\u90fd\u653e\u5728\u8cc7\u6599\u593e\u540d\u7a31\u70ba\u300c06.Uart Communication\u300d\u3002<\/p>\n\n\n\n<!--nextpage-->\n\n\n\n<h2 class=\"wp-block-heading\">\u4e94\u3001\u7a0b\u5f0f\u64b0\u5beb<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. \u87a2\u5e55\u986f\u793a\u8a0a\u606f<\/h3>\n\n\n\n<p>\u5b78\u6703\u986f\u793a\u8a0a\u606f\u662f\u76f8\u7576\u91cd\u8981\u7684\u529f\u80fd\uff0c\u53ef\u4ee5\u8b93\u6211\u5011\u4e0d\u5916\u52a0\u5176\u4ed6\u88dd\u7f6e\u7684\u60c5\u6cc1\u4e0b\uff0c\u7d93\u7531\u87a2\u5e55\u5c07\u8a0a\u606f\u986f\u793a\u51fa\u4f86\uff0c\u53ef\u7528\u4f86\u78ba\u8a8d\u7a0b\u5f0f\u662f\u5426\u6b63\u78ba\uff0c\u662f\u500b\u9664\u932f\u7684\u597d\u5de5\u5177\u3002<\/p>\n\n\n\n<p>\u8b93\u6211\u5011\u4f86\u770b\u4e00\u4e0b\u986f\u793a\u8a0a\u606f\u662f\u600e\u9ebc\u904b\u4f5c\u7684\uff0c\u8acb\u958b\u555f\u300c06.Uart Communication\u300d\u8cc7\u6599\u593e\uff0c\u6253\u958b\u7bc4\u4f8b\u7a0b\u5f0f\u540d\u7a31\u70ba\u300c01.LCD_Show_ESP32\u300d\uff0c\u9032\u5230\u8cc7\u6599\u593e\u5c0d\u88e1\u9762\u7684\u7a0b\u5f0f\u6a94\u6848\u9ede\u5169\u4e0b\u5373\u53ef\u958b\u555f\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/www.circuspi.com\/wp-content\/uploads\/2022\/04\/14-2.jpg\" alt=\"Pixel:Bit \u6559\u5b78(\u4e8c) - ESP32 \u8207 ATmega328P \u7684 UART \u901a\u8a0a\" class=\"wp-image-14913\" width=\"680\"\/><\/figure><\/div>\n\n\n\n<p>\u5b8c\u6574\u7a0b\u5f0f\u78bc\u5982\u4e0b\u5716\u6240\u793a\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"437\" height=\"463\" src=\"https:\/\/www.circuspi.com\/wp-content\/uploads\/2022\/04\/15-1.jpg\" alt=\"Pixel:Bit \u6559\u5b78(\u4e8c) - ESP32 \u8207 ATmega328P \u7684 UART \u901a\u8a0a\" class=\"wp-image-14914\"\/><\/figure><\/div>\n\n\n\n<p>\u5728\u4f7f\u7528 LCD \u87a2\u5e55\u4e4b\u524d\u9700\u8981\u532f\u5165\u76f8\u95dc\u7a0b\u5f0f\u5eab\uff0c\u4e26\u8ce6\u4e88\u7269\u4ef6\u529f\u80fd\uff0c\u88ab\u8ce6\u4e88\u7684\u7269\u4ef6\u540d\u7a31\u70ba\u300ctft\u300d\uff0c\u4e4b\u5f8c\u8abf\u7528\u986f\u793a\u529f\u80fd\u53ef\u76f4\u63a5\u4ee5 tft \u4ee3\u7a31\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"437\" height=\"48\" src=\"https:\/\/www.circuspi.com\/wp-content\/uploads\/2022\/04\/16-1.jpg\" alt=\"Pixel:Bit \u6559\u5b78(\u4e8c) - ESP32 \u8207 ATmega328P \u7684 UART \u901a\u8a0a\" class=\"wp-image-14915\"\/><\/figure><\/div>\n\n\n\n<p>\u63a5\u8457\u5728 setup \u5340\u584a\uff0c\u6211\u5011\u521d\u59cb\u5316\u986f\u793a\u87a2\u5e55\uff0c\u4e26\u65cb\u8f49\u87a2\u5e55\u65b9\u5411\u4ee5\u7b26\u5408 Pixel:Bit \u7684\u914d\u7f6e\uff0c\u6700\u5f8c\u5c07\u87a2\u5e55\u986f\u793a\u9ed1\u8272\uff08\u6709\u9ede\u985e\u4f3c\u6e05\u7a7a\u6240\u6709\u8a0a\u606f\u7684\u611f\u89ba\uff09\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"437\" height=\"98\" src=\"https:\/\/www.circuspi.com\/wp-content\/uploads\/2022\/04\/17.jpg\" alt=\"Pixel:Bit \u6559\u5b78(\u4e8c) - ESP32 \u8207 ATmega328P \u7684 UART \u901a\u8a0a\" class=\"wp-image-14916\"\/><\/figure><\/div>\n\n\n\n<p>\u9810\u8a2d\u7684\u984f\u8272\u7e3d\u5171\u6709 24 \u7a2e\uff0c\u5982\u4e0b\u8868\u6240\u793a\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"613\" height=\"311\" src=\"https:\/\/www.circuspi.com\/wp-content\/uploads\/2022\/04\/18-1.jpg\" alt=\"Pixel:Bit \u6559\u5b78(\u4e8c) - ESP32 \u8207 ATmega328P \u7684 UART \u901a\u8a0a\" class=\"wp-image-14917\"\/><\/figure><\/div>\n\n\n\n<p>\u986f\u793a\u6587\u5b57\u6709\u5e7e\u500b\u6b65\u9a5f\uff0c\u7b2c\u4e00\u662f\u6c7a\u5b9a\u4f4d\u7f6e\u8207\u5b57\u578b\uff0c\u87a2\u5e55\u50cf\u7d20\u5927\u5c0f\u70ba 240 x 240\uff0c\u60a8\u53ef\u4ee5\u5728\u9019\u500b\u7bc4\u570d\u5167\u6c7a\u5b9a\u5f9e\u54ea\u500b\u4f4d\u7f6e\u958b\u59cb\u986f\u793a\u6587\u5b57\uff0c\u7a0b\u5f0f\u300csetCursor(0, 0, 2)\u300d\u62ec\u5f27\u5167\u7684\u982d\u5169\u500b\u6578\u5b57\u8868\u793a x, y \u5ea7\u6a19\uff0c\u6700\u5f8c\u4e00\u500b\u5247\u662f\u5b57\u578b\uff0c\u5171\u6709 6 \u7a2e\u5b57\u578b(1, 2, 4, 6, 7, 8)\uff0c\u4ee5\u586b\u5165\u6578\u5b57\u7684\u65b9\u5f0f\u9078\u64c7\u5b57\u578b\uff0c\u6bcf\u500b\u5b57\u578b\u652f\u63f4\u7684\u6700\u5927\u5c3a\u5bf8\u4e5f\u4e0d\u540c\u3002<\/p>\n\n\n\n<p>\u7b2c\u4e8c\u6b65\u9a5f\u662f\u6c7a\u5b9a\u6587\u5b57\u984f\u8272\u8207\u80cc\u666f\u984f\u8272\uff0c\u7a0b\u5f0f\u300csetTextColor(TFT_ORANGE, TFT_BLACK)\u300d\u62ec\u5f27\u5167\u7684\u7b2c\u4e00\u500b\u984f\u8272\u662f\u6307\u6587\u5b57\u984f\u8272\uff0c\u53e6\u4e00\u500b\u662f\u80cc\u666f\u984f\u8272\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"437\" height=\"119\" src=\"https:\/\/www.circuspi.com\/wp-content\/uploads\/2022\/04\/19-1.jpg\" alt=\"Pixel:Bit \u6559\u5b78(\u4e8c) - ESP32 \u8207 ATmega328P \u7684 UART \u901a\u8a0a\" class=\"wp-image-14918\"\/><\/figure><\/div>\n\n\n\n<p>\u63a5\u8457\u662f\u6587\u5b57\u5927\u5c0f\uff0c\u5171\u6709 7 \u7a2e\u5c3a\u5bf8\uff0c\u586b\u5165\u6578\u5b57\u8d8a\u5927\uff0c\u6587\u5b57\u5c3a\u5bf8\u8d8a\u5927\u3002\u6700\u5f8c\u5247\u662f\u4f7f\u7528\u7a0b\u5f0f\u300cprintln(&#8220;\u586b\u5165\u8981\u986f\u793a\u7684\u6587\u5b57&#8221;)\u300d\u986f\u793a\u4e00\u884c\u6587\u5b57\u3002<\/p>\n\n\n\n<p>\u4e0a\u5716\u7a0b\u5f0f\u662f\u986f\u793a\u4e00\u884c\u5b57\u578b\u70ba 2 \u5927\u5c0f\u70ba 2\uff0c\u984f\u8272\u70ba\u6a58\u8272\u7684\u6587\u5b57\uff0c\u6587\u5b57\u5167\u5bb9\u662f\u300cHello pixel:bit.\u300d\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. \u4e0a\u50b3\u7a0b\u5f0f\u5230 ESP32 \u7684\u65b9\u6cd5<\/h3>\n\n\n\n<p>\u77e5\u9053\u7a0b\u5f0f\u6240\u8981\u5b8c\u6210\u7684\u529f\u80fd\u5f8c\uff0c\u6211\u5011\u5c07\u7a0b\u5f0f\u4e0a\u50b3\u5230 Pixel:Bit\uff0c\u770b\u4e00\u4e0b\u87a2\u5e55\u986f\u793a\u7684\u6548\u679c\u3002\u56e0\u70ba\u8ca0\u8cac\u8655\u7406\u87a2\u5e55\u986f\u793a\u7684\u662f ESP32\uff0c\u6240\u4ee5\u9996\u5148\u5c07 Pixel:Bit \u4e0a\u9762\u7684 UART \u5207\u63db\u958b\u95dc\uff0c\u5207\u81f3\u300cESP\u300d\u6a21\u5f0f\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/www.circuspi.com\/wp-content\/uploads\/2022\/04\/20-1.jpg\" alt=\"Pixel:Bit \u6559\u5b78(\u4e8c) - ESP32 \u8207 ATmega328P \u7684 UART \u901a\u8a0a\" class=\"wp-image-14919\" width=\"680\"\/><\/figure><\/div>\n\n\n\n<p>\u63a5\u4e0b\u4f86\u9023\u63a5 Micro USB \u6578\u64da\u7dda\u81f3 Pixel:Bit \u8207\u96fb\u8166\uff0c\u4e26\u65bc\u300c\u5de5\u5177\u300d\uff1e\u300c\u958b\u767c\u677f\u300d\u7684\u6b04\u4f4d\u9078\u64c7\u300cAI Thinker ESP32-CAM\u300d\u9019\u584a\u958b\u767c\u677f\uff0c\u4e26\u9078\u64c7\u6b63\u78ba\u7684\u300c\u5e8f\u5217\u57e0\u300d\uff0c\u5e8f\u5217\u57e0\u7684\u7de8\u865f\u6703\u4f9d\u7167\u60a8\u81ea\u5df1\u7684\u96fb\u8166\u8a2d\u5b9a\u800c\u8207\u4e0b\u5716\u6709\u6240\u4e0d\u540c\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"609\" height=\"398\" src=\"https:\/\/www.circuspi.com\/wp-content\/uploads\/2022\/04\/21-1.jpg\" alt=\"Pixel:Bit \u6559\u5b78(\u4e8c) - ESP32 \u8207 ATmega328P \u7684 UART \u901a\u8a0a\" class=\"wp-image-14920\"\/><\/figure><\/div>\n\n\n\n<p>\u8a2d\u5b9a\u5b8c\u6210\u5f8c\uff0c\u8acb\u6309\u4e0b\u71d2\u9304\u6309\u9215\u5c07\u7a0b\u5f0f\u71d2\u9304\u5230 Pixel:Bit\u3002\u71d2\u9304\u904e\u7a0b\u6703\u9700\u8981\u4e00\u6bb5\u6642\u9593\uff0c\u5b8c\u6210\u5f8c\u6703\u5728\u8a0a\u606f\u6b04\u5167\u6536\u5230\u63d0\u793a\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"595\" height=\"172\" src=\"https:\/\/www.circuspi.com\/wp-content\/uploads\/2022\/04\/22.jpg\" alt=\"Pixel:Bit \u6559\u5b78(\u4e8c) - ESP32 \u8207 ATmega328P \u7684 UART \u901a\u8a0a\" class=\"wp-image-14921\"\/><\/figure><\/div>\n\n\n\n<p>\u71d2\u9304\u5b8c\u6210\uff0c\u5373\u53ef\u5728 Pixel:Bit \u4e0a\u770b\u5230\u525b\u525b\u64b0\u5beb\u7684\u6587\u5b57\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/www.circuspi.com\/wp-content\/uploads\/2022\/04\/23-3.jpg\" alt=\"Pixel:Bit \u6559\u5b78(\u4e8c) - ESP32 \u8207 ATmega328P \u7684 UART \u901a\u8a0a\" class=\"wp-image-14922\" width=\"680\"\/><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">3. \u64b0\u5beb UART \u901a\u8a0a\u7a0b\u5f0f<\/h3>\n\n\n\n<p>\u63a5\u4e0b\u4f86\u8b93\u6211\u5011\u5b78\u7fd2\u5982\u4f55\u5728 ESP32 \u8207 ATmega328P \u88e1\uff0c\u64b0\u5beb\u80fd\u76f8\u4e92\u901a\u8a0a\u7684\u7a0b\u5f0f\u3002<\/p>\n\n\n\n<p>\u9019\u500b\u529f\u80fd\u975e\u5e38\u65b9\u4fbf\uff0c\u4f8b\u5982\u6211\u5011\u53ef\u4ee5\u8b93 ATmega328P \u9023\u63a5\u611f\u6e2c\u5668\uff0c\u4e26\u8b80\u53d6\u74b0\u5883\u8cc7\u6599\uff0cESP32 \u8ca0\u8cac\u986f\u793a\u8cc7\u8a0a\u8207\u4e0a\u50b3\u8cc7\u6599\u5230\u96f2\u7aef\u3002\u6216\u662f ESP32 \u5c07\u6548\u80fd\u5168\u529b\u7528\u5728\u5f71\u50cf\u8fa8\u8b58\uff0c\u800c\u63a7\u5236\u593e\u722a\u7684\u5de5\u4f5c\u5c31\u4ea4\u7d66 ATmega328P\uff0c\u89e3\u6c7a\u4e86\u55ae\u4e00\u63a7\u5236\u5668\u6703\u9047\u5230\u7684\u591a\u5de5\u554f\u984c\u3002<\/p>\n\n\n\n<p>\u6211\u5011\u4ee5 ATmega328P \u70ba\u767c\u9001\u8a0a\u606f\u8005\uff0cESP32 \u70ba\u63a5\u6536\u8005\uff0c\u4e26\u8ca0\u8cac\u5c07\u6536\u5230\u7684\u8a0a\u606f\u986f\u793a\u5728\u87a2\u5e55\u4e0a\u3002\u5148\u4f86\u770b ESP32 \u9019\u908a\u7684\u7a0b\u5f0f\u78bc\uff0c\u8acb\u958b\u555f\u300c02.UART_Read_and_Show_ESP32\u300d\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/www.circuspi.com\/wp-content\/uploads\/2022\/04\/24.jpg\" alt=\"Pixel:Bit \u6559\u5b78(\u4e8c) - ESP32 \u8207 ATmega328P \u7684 UART \u901a\u8a0a\" class=\"wp-image-14923\" width=\"680\"\/><\/figure><\/div>\n\n\n\n<p>\u5b8c\u6574\u7a0b\u5f0f\u78bc\u5982\u4e0b\u5716\u6240\u793a\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"622\" height=\"702\" src=\"https:\/\/www.circuspi.com\/wp-content\/uploads\/2022\/04\/25-1.jpg\" alt=\"Pixel:Bit \u6559\u5b78(\u4e8c) - ESP32 \u8207 ATmega328P \u7684 UART \u901a\u8a0a\" class=\"wp-image-14924\"\/><\/figure><\/div>\n\n\n\n<p>\u8207\u4e0a\u500b\u7a0b\u5f0f\u4e00\u6a23\u532f\u5165\u7a0b\u5f0f\u5eab\u4e26\u8ce6\u4e88\u7269\u4ef6\uff0c\u5728\u9019\u88e1\u65b0\u589e\u4e00\u500b\u5b57\u4e32\u985e\u578b\u7684\u8b8a\u6578\u300cinputString\u300d\u4e26\u8ce6\u4e88\u503c\u70ba\uff02\uff02\uff0c\u9019\u500b\u8b8a\u6578\u6703\u7528\u4f86\u5132\u5b58\u5f9e ATmega328P \u63a5\u6536\u5230\u7684\u8a0a\u606f\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"622\" height=\"93\" src=\"https:\/\/www.circuspi.com\/wp-content\/uploads\/2022\/04\/26.jpg\" alt=\"Pixel:Bit \u6559\u5b78(\u4e8c) - ESP32 \u8207 ATmega328P \u7684 UART \u901a\u8a0a\" class=\"wp-image-14925\"\/><\/figure><\/div>\n\n\n\n<p>\u5728 setup \u7684\u5340\u584a\uff0c\u6211\u5011\u555f\u7528 UART \u529f\u80fd Serial\uff0c\u4e26\u8ce6\u4e88\u50b3\u8f38\u901f\u7387\u70ba\u300c57600\u300d\uff0c\u63a5\u8457\u521d\u59cb\u5316\u986f\u793a\u87a2\u5e55\u4e26\u986f\u793a\u9ed1\u8272\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"622\" height=\"153\" src=\"https:\/\/www.circuspi.com\/wp-content\/uploads\/2022\/04\/27.jpg\" alt=\"Pixel:Bit \u6559\u5b78(\u4e8c) - ESP32 \u8207 ATmega328P \u7684 UART \u901a\u8a0a\" class=\"wp-image-14926\"\/><\/figure><\/div>\n\n\n\n<p>\u5728 loop \u7684\u5340\u584a\uff0c\u6211\u5011\u900f\u904e\u300cSerial.available()\u300d\u9019\u500b\u7a0b\u5f0f\u6aa2\u67e5 Serial \u9023\u7dda\u6642\uff0c\u662f\u5426\u6709\u8a0a\u606f\u50b3\u9001\u904e\u4f86\u3002\u4e26\u65b0\u589e\u4e00\u500b\u5b57\u5143\u985e\u578b\u7684\u8b8a\u6578\u300cinChar\u300d\u4f86\u63a5\u6536\u8a0a\u606f\uff0c\u518d\u4f7f\u7528\u8b8a\u6578\u300cinputString\u300d\u5c07\u4e00\u500b\u500b\u8a0a\u606f\u7d44\u5408\u8d77\u4f86\u3002<\/p>\n\n\n\n<p>\u6bcf\u6b21\u63a5\u6536\u4e00\u500b\u8a0a\u606f\u5f8c\u90fd\u6703\u6aa2\u67e5\u8b8a\u6578\u300cinChar\u300d\uff0c\u67e5\u770b\u63a5\u6536\u5230\u7684\u8a0a\u606f\u662f\u5426\u7b49\u65bc\u63db\u884c\u8a0a\u606f\u300c&#8217;\\n&#8217;\u300d\u3002\u82e5\u662f\u6536\u5230\u63db\u884c\u8a0a\u606f\uff0c\u8868\u793a\u8cc7\u6599\u50b3\u8f38\u5b8c\u6210\uff0c\u6211\u5011\u5c31\u80fd\u900f\u904e\u4e0a\u500b\u7a0b\u5f0f\u5b78\u5230\u7684\u986f\u793a\u6587\u5b57\uff0c\u5c07\u6536\u5230\u7684\u8a0a\u606f\u986f\u793a\u5230\u87a2\u5e55\u4e0a\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"622\" height=\"297\" src=\"https:\/\/www.circuspi.com\/wp-content\/uploads\/2022\/04\/28.jpg\" alt=\"Pixel:Bit \u6559\u5b78(\u4e8c) - ESP32 \u8207 ATmega328P \u7684 UART \u901a\u8a0a\" class=\"wp-image-14927\"\/><\/figure><\/div>\n\n\n\n<p>ESP32 \u63a5\u6536\u8207\u986f\u793a\u7684\u7a0b\u5f0f\u5c31\u5982\u4e0a\u5716\u6240\u793a\uff0c\u73fe\u5728\u5c07\u9019\u500b\u7a0b\u5f0f\u71d2\u9304\u5230 ESP32 \u88e1\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">4. ATmega328P \u767c\u9001\u8a0a\u606f\u7684\u7a0b\u5f0f<\/h3>\n\n\n\n<p>\u63a5\u4e0b\u4f86\u8b93\u6211\u5011\u4f86\u770b ATmega328P \u767c\u9001\u8a0a\u606f\u7684\u7a0b\u5f0f\uff0c\u8acb\u958b\u555f\u7b2c\u4e09\u500b\u7a0b\u5f0f\u300c03.UART_Send_ATmega328p\u300d\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/www.circuspi.com\/wp-content\/uploads\/2022\/04\/29.jpg\" alt=\"Pixel:Bit \u6559\u5b78(\u4e8c) - ESP32 \u8207 ATmega328P \u7684 UART \u901a\u8a0a\" class=\"wp-image-14928\" width=\"680\"\/><\/figure><\/div>\n\n\n\n<p>\u5b8c\u6574\u7a0b\u5f0f\u78bc\u5982\u4e0b\u5716\u6240\u793a\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"321\" height=\"321\" src=\"https:\/\/www.circuspi.com\/wp-content\/uploads\/2022\/04\/30.jpg\" alt=\"Pixel:Bit \u6559\u5b78(\u4e8c) - ESP32 \u8207 ATmega328P \u7684 UART \u901a\u8a0a\" class=\"wp-image-14929\"\/><\/figure><\/div>\n\n\n\n<p>\u4f5c\u70ba\u8a0a\u606f\u767c\u9001\u8005\u7684 ATmega328P\uff0c\u7a0b\u5f0f\u8f03\u70ba\u7c21\u55ae\uff0c\u53ea\u8981\u55ae\u7d14\u7684\u767c\u9001\u5373\u53ef\u3002<\/p>\n\n\n\n<p>\u9996\u5148\u65b0\u589e\u4e00\u500b\u6574\u6578\u985e\u578b\u7684\u8b8a\u6578\u300ctext\u300d\uff0c\u4e26\u8a2d\u5b9a\u521d\u59cb\u503c\u70ba 1\u3002\u4e26\u65bc setup \u5340\u584a\u540c\u6a23\u555f\u7528 UART \u529f\u80fd Serial\uff0c\u4e26\u8ce6\u4e88\u50b3\u8f38\u901f\u7387\u540c\u6a23\u70ba\u300c57600\u300d\u3002\u5169\u584a\u63a7\u5236\u5668\u901f\u7387\u9700\u8981\u76f8\u540c\uff0c\u9019\u6a23\u624d\u80fd\u6b63\u5e38\u6536\u767c\u8a0a\u606f\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"321\" height=\"91\" src=\"https:\/\/www.circuspi.com\/wp-content\/uploads\/2022\/04\/31.jpg\" alt=\"Pixel:Bit \u6559\u5b78(\u4e8c) - ESP32 \u8207 ATmega328P \u7684 UART \u901a\u8a0a\" class=\"wp-image-14930\"\/><\/figure><\/div>\n\n\n\n<p>\u5728 loop \u5340\u584a\uff0c\u6211\u5011\u900f\u904e\u300cSerial.println\u300d\u9019\u500b\u7a0b\u5f0f\u767c\u9001\u4e00\u884c\u8a0a\u606f\uff0c\u8a0a\u606f\u5167\u5bb9\u70ba\u8b8a\u6578 text \u5132\u5b58\u7684\u6578\u5b57\u3002\u767c\u9001\u5b8c\u5f8c\u5c07\u8b8a\u6578 text \u5132\u5b58\u7684\u6578\u5b57\u7d2f\u52a0 1\uff0c\u63a5\u8457\u6aa2\u67e5\u6578\u5b57\u662f\u5426\u8d85\u904e 100\uff0c\u5982\u679c\u8d85\u904e\u6703\u5c07 text \u5132\u5b58\u7684\u6578\u5b57\u5f37\u5236\u66f4\u6539\u6210 1\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"321\" height=\"138\" src=\"https:\/\/www.circuspi.com\/wp-content\/uploads\/2022\/04\/32.jpg\" alt=\"Pixel:Bit \u6559\u5b78(\u4e8c) - ESP32 \u8207 ATmega328P \u7684 UART \u901a\u8a0a\" class=\"wp-image-14931\"\/><\/figure><\/div>\n\n\n\n<p>\u7d93\u7531\u66ab\u505c\u6beb\u79d2\u7a0b\u5f0f\u300cdelay(1000)\u300d\uff0c\u6703\u8b93\u7a0b\u5f0f\u4ee5\u6bcf\u9694 1 \u79d2\u7684\u6642\u9593\u767c\u9001\u8a0a\u606f\uff0c\u8a0a\u606f\u5167\u5bb9\u70ba 1~100\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">5. \u4e0a\u50b3\u7a0b\u5f0f\u5230 ATmega328P \u7684\u65b9\u6cd5<\/h3>\n\n\n\n<p>\u9996\u5148\u5c07 Pixel:Bit \u4e0a\u9762\u7684 UART \u5207\u63db\u958b\u95dc\uff0c\u5207\u81f3\u300cPRO MINI\u300d\u6a21\u5f0f\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/www.circuspi.com\/wp-content\/uploads\/2022\/04\/33.jpg\" alt=\"Pixel:Bit \u6559\u5b78(\u4e8c) - ESP32 \u8207 ATmega328P \u7684 UART \u901a\u8a0a\" class=\"wp-image-14932\" width=\"680\"\/><\/figure><\/div>\n\n\n\n<p>\u65bc\u300c\u5de5\u5177\u300d\uff1e\u300c\u958b\u767c\u677f\u300d\u7684\u6b04\u4f4d\u9078\u64c7\u300cArduino Pro or Pro Mini\u300d\u9019\u584a\u958b\u767c\u677f\uff0c\u4e26\u65bc\u8655\u7406\u5668\u9078\u9805\u9078\u64c7\u300cATmega328P(3.3V, 8 MHz)\u300d\u3002\u4e00\u6a23\u9078\u64c7\u6b63\u78ba\u7684\u300c\u5e8f\u5217\u57e0\u300d\uff0c\u5e8f\u5217\u57e0\u7684\u7de8\u865f\u6703\u4f9d\u7167\u60a8\u81ea\u5df1\u7684\u96fb\u8166\u8a2d\u5b9a\u800c\u8207\u4e0b\u5716\u6709\u6240\u4e0d\u540c\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"627\" height=\"392\" src=\"https:\/\/www.circuspi.com\/wp-content\/uploads\/2022\/04\/34-1.jpg\" alt=\"Pixel:Bit \u6559\u5b78(\u4e8c) - ESP32 \u8207 ATmega328P \u7684 UART \u901a\u8a0a\" class=\"wp-image-14938\"\/><\/figure><\/div>\n\n\n\n<p>\u6700\u5f8c\u6309\u4e0b\u71d2\u9304\u6309\u9215\uff0c\u5c07\u7a0b\u5f0f\u71d2\u9304\u5230 ATmega328P\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.circuspi.com\/wp-content\/uploads\/2022\/04\/35-1.jpg\" alt=\"Pixel:Bit \u6559\u5b78(\u4e8c) - ESP32 \u8207 ATmega328P \u7684 UART \u901a\u8a0a\" class=\"wp-image-14939\" width=\"714\" height=\"198\"\/><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">6. \u5207\u63db\u4e92\u9023\u6a21\u5f0f<\/h3>\n\n\n\n<p>\u7576\u5169\u908a\u7684\u7a0b\u5f0f\u90fd\u71d2\u9304\u5b8c\u6210\u5f8c\uff0c\u5c31\u80fd\u5c07 UART \u6a21\u5f0f\u5207\u63db\u958b\u95dc\u5207\u81f3\u4e92\u9023\u6a21\u5f0f\u300cGO\u300d\uff0c\u9019\u500b\u6a21\u5f0f\u6703\u8b93 ESP32 \u8207 ATmega328P \u9023\u63a5\u5728\u4e00\u8d77\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/www.circuspi.com\/wp-content\/uploads\/2022\/04\/36-1.jpg\" alt=\"Pixel:Bit \u6559\u5b78(\u4e8c) - ESP32 \u8207 ATmega328P \u7684 UART \u901a\u8a0a\" class=\"wp-image-14940\" width=\"680\"\/><\/figure><\/div>\n\n\n\n<p>\u5207\u63db\u904e\u53bb\u5f8c\u91cd\u65b0\u62d4\u63d2 Micro USB\uff0c\u6b64\u6642 ATmega328P \u5c31\u6703\u958b\u59cb\u767c\u9001\u8cc7\u6599\uff0cESP32 \u63a5\u6536\u5230\u8cc7\u6599\u5f8c\u5c31\u6703\u986f\u793a\u5728\u87a2\u5e55\u4e0a\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lh6.googleusercontent.com\/ZixymDgC-JSvlT2tsTE-sRs0LOXNYsVRW6udkWLnUzRjXb_m5m-kDCdk95bC6V84g9tQOLkn1rHqDsHC7JQ7DChHjt-wmXrb0nSMLgjgXCGMR-e97EN87F0rb5_CHsx8Ho8gKcs4\" alt=\"Pixel:Bit \u6559\u5b78(\u4e8c) - ESP32 \u8207 ATmega328P \u7684 UART \u901a\u8a0a\" width=\"600\" height=\"323\"\/><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u516d\u3001\u9032\u968e\u7a0b\u5f0f\u64b0\u5beb<\/h2>\n\n\n\n<p>\u7d93\u904e\u524d\u9762\u7684\u6559\u5b78\uff0c\u76f8\u4fe1\u5927\u5bb6\u5c0d\u65bc\u5169\u9846\u63a7\u5236\u5668\u71d2\u9304\u7a0b\u5f0f\u7684\u65b9\u6cd5\u3001\u6536\u767c\u7a0b\u5f0f\u7684\u65b9\u5f0f\u8207\u4e92\u9023\u7684\u90e8\u4efd\uff0c\u5df2\u6709\u4e86\u4e9b\u8a31\u7684\u6982\u5ff5\u3002<\/p>\n\n\n\n<p>\u63a5\u4e0b\u4f86\u8b93\u6211\u5011\u63d0\u9ad8\u4e00\u9ede\u7a0b\u5f0f\u96e3\u5ea6\uff0c\u6539\u767c\u9001\u6709\u610f\u7fa9\u7684\u6587\u5b57\uff0c\u4e26\u8b93\u63a5\u6536\u7aef\u9664\u4e86\u63a5\u6536\u8a0a\u606f\u5916\uff0c\u589e\u52a0\u6bd4\u5c0d\u6587\u5b57\u7684\u6b65\u9a5f\u3002\u4f9d\u7167\u6536\u5230\u7684\u8a0a\u606f\uff0c\u986f\u793a\u5c0d\u61c9\u7684\u6587\u5b57\u984f\u8272\u3002<\/p>\n\n\n\n<p>\u8b93\u6211\u5011\u9019\u6b21\u5148\u5f9e\u767c\u9001\u8005\u958b\u59cb\uff0c\u8acb\u5148\u958b\u555f\u7b2c\u4e94\u500b\u7a0b\u5f0f\u300c05.UART_Send2_ATmega328p\u300d\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.circuspi.com\/wp-content\/uploads\/2022\/04\/38.jpg\" alt=\"Pixel:Bit \u6559\u5b78(\u4e8c) - ESP32 \u8207 ATmega328P \u7684 UART \u901a\u8a0a\" class=\"wp-image-14941\" width=\"616\" height=\"333\"\/><\/figure><\/div>\n\n\n\n<p>\u5b8c\u6574\u7a0b\u5f0f\u78bc\u5982\u4e0b\u5716\u6240\u793a\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"280\" height=\"358\" src=\"https:\/\/www.circuspi.com\/wp-content\/uploads\/2022\/04\/39-1.jpg\" alt=\"Pixel:Bit \u6559\u5b78(\u4e8c) - ESP32 \u8207 ATmega328P \u7684 UART \u901a\u8a0a\" class=\"wp-image-14942\"\/><\/figure><\/div>\n\n\n\n<p>\u53ef\u4ee5\u770b\u5230\u7a0b\u5f0f\u78bc\u5167 loop \u7684\u5340\u584a\uff0c\u4ee5\u6bcf\u79d2\u7684\u983b\u7387\u767c\u9001\u8868\u793a\u984f\u8272\u7684\u6587\u5b57\u8a0a\u606f\uff0c\u5206\u5225\u662f\u300cRed\u300d\u3001\u300cGreen\u300d\u3001\u300cBlue\u300d\u8207\u300cGray\u300d\u3002<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\"><p><strong>\u5c0f\u77e5\u8b58<\/strong><\/p><cite>\u300cSerial.println(&#8220;Red&#8221;)\u300d\u5be6\u969b\u4e0a\u767c\u9001\u7684\u8a0a\u606f\u662f\u300cRed\\r\\n\u300d\uff0c\u800c\u4e0d\u662f\u55ae\u7d14\u7684\u300cRed\u300d\uff0c\\r \u8868\u793a\u7684\u662f\u78ba\u8a8d\u9375\u6216\u8f38\u5165\u9375\uff08\u9375\u76e4\u4e0a\u7684 Enter\uff09\uff0c\\n \u5247\u662f\u63db\u884c\u7684\u610f\u601d\u3002\u56e0\u70ba \\r\\n \u662f\u8868\u793a\u8a0a\u606f\u7684\u5448\u73fe\u65b9\u5f0f\uff0c\u6240\u4ee5\u900f\u904e\u5e8f\u5217\u57e0\u76e3\u63a7\u8996\u7a97\u6216\u662f\u986f\u793a\u87a2\u5e55\u7684\u7a0b\u5f0f\u5c07\u300cRed\\r\\n\u300d\u5370\u51fa\u4f86\u6642\uff0c\u4e26\u4e0d\u6703\u771f\u7684\u986f\u793a\\r\\n\u51fa\u4f86\uff0c\u53ea\u6703\u986f\u793a\u300cRed\u300d\uff0c\u4f46\u4e0d\u4ee3\u8868\u5b83\u5011\u4e0d\u5b58\u5728\u3002<\/cite><\/blockquote>\n\n\n\n<p>\u63a5\u8457\u8b93\u6211\u5011\u4f86\u770b\u63a5\u6536\u7aef\u7684\u7a0b\u5f0f\uff0c\u9019\u500b\u7a0b\u5f0f\u5305\u542b\u63a5\u6536\u5f8c\u6bd4\u5c0d\uff0c\u8207\u986f\u793a\u7684\u90e8\u4efd\uff0c\u8acb\u958b\u555f\u7b2c\u56db\u500b\u7a0b\u5f0f\u300c04.UART_Read_and_Show2_ESP32\u300d\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.circuspi.com\/wp-content\/uploads\/2022\/04\/40-1.jpg\" alt=\"Pixel:Bit \u6559\u5b78(\u4e8c) - ESP32 \u8207 ATmega328P \u7684 UART \u901a\u8a0a\" class=\"wp-image-14943\" width=\"600\" height=\"291\"\/><\/figure><\/div>\n\n\n\n<p>\u8b93\u6211\u5011\u76f4\u63a5\u4f86\u770b\u6bd4\u5c0d\u8207\u986f\u793a\u7684\u7a0b\u5f0f\uff0c\u6bd4\u5c0d\u7684\u90e8\u5206\u9700\u8981\u5c07\u300c\\r\\n\u300d\u4e00\u4f75\u505a\u6bd4\u5c0d\uff0c\u96d6\u7136\u986f\u793a\u6642\u770b\u4e0d\u5230\uff0c\u4f46\u78ba\u5be6\u6709\u50b3\u9001\u904e\u4f86\uff0c\u82e5\u662f\u5ffd\u7565\u9019\u5169\u500b\u6771\u897f\uff0c\u6bd4\u5c0d\u662f\u6703\u5931\u6557\u7684\u5594\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"646\" height=\"383\" src=\"https:\/\/www.circuspi.com\/wp-content\/uploads\/2022\/04\/41.jpg\" alt=\"Pixel:Bit \u6559\u5b78(\u4e8c) - ESP32 \u8207 ATmega328P \u7684 UART \u901a\u8a0a\" class=\"wp-image-14944\"\/><\/figure><\/div>\n\n\n\n<p>\u5728\u986f\u793a\u7684\u5730\u65b9\u6211\u5011\u4f9d\u7167\u6bd4\u5c0d\u5230\u7684\u8a0a\u606f\uff0c\u5728\u8a2d\u5b9a\u986f\u793a\u6587\u5b57\u984f\u8272\u7684\u5730\u65b9\u4e00\u4f75\u66f4\u6539\u5c0d\u61c9\u7684\u984f\u8272\u3002\u4f8b\u5982\u6536\u5230\u300cRed\\r\\n\u300d\uff0c\u6587\u5b57\u5c31\u5448\u73fe<span style=\"color:#cf2e2e\" class=\"tadv-color\"><strong>\u7d05\u8272<\/strong><\/span>\u3002<\/p>\n\n\n\n<p>\u770b\u5b8c\u4e86\u5169\u908a\u7684\u7a0b\u5f0f\uff0c\u5c31\u8b93\u6211\u5011\u4f9d\u7167\u4e4b\u524d\u6559\u904e\u7684\u6b65\u9a5f\uff0c\u5206\u5225\u71d2\u9304\u7a0b\u5f0f\u5230 ESP32 \u8207 ATmega328P \u88e1\u3002<\/p>\n\n\n\n<p>\u71d2\u9304\u5b8c\u6210\u5f8c\u8acb\u5c07 UART \u6a21\u5f0f\u958b\u95dc\u5207\u63db\u81f3\u300cGO\u300d\uff0c\u6210\u529f\u7684\u8a71\u5c31\u80fd\u770b\u5230\u5982\u4e0b\u65b9\u7684\u756b\u9762\uff08<span style=\"color:#00d084\" class=\"tadv-color\"><strong>\u7da0\u8272<\/strong><\/span>\u7684\u90e8\u5206\u9304\u5f71\u986f\u793a\u4e0d\u662f\u5f88\u6e05\u695a\uff09\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/xHDAzmqOKDTiOy70BKaizjyAJEaOvI4kP10HQkqd7ZScjOwNTjEsZ2ErPZB_n6jSavwwj3dqf8EMp64rm0Eui1F9OGcwXP6f9ij_U1eMUEgv2z2Tt0rIAqqztIDFK31I9hS1PMxT\" alt=\"Pixel:Bit \u6559\u5b78(\u4e8c) - ESP32 \u8207 ATmega328P \u7684 UART \u901a\u8a0a\" width=\"600\" height=\"298\"\/><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e03\u3001\u7d50\u8ad6<\/h2>\n\n\n\n<p>\u5728\u9019\u500b\u55ae\u5143\uff0c\u6211\u5011\u5b78\u7fd2\u4e86\u5982\u4f55\u900f\u904e\u986f\u793a\u87a2\u5e55\u986f\u793a\u8cc7\u8a0a\uff0c\u4e26\u4e14\u5206\u5225\u5728\u5169\u9846\u63a7\u5236\u5668\u71d2\u9304\u5c0d\u61c9\u7684\u7a0b\u5f0f\uff0c\u8b93\u5b83\u5011\u80fd\u9032\u884c\u901a\u8a0a\u3002\u5728\u63a5\u4e0b\u4f86\u7684\u55ae\u5143\uff0c\u6211\u5011\u6642\u5e38\u6703\u7528\u5230\u4e92\u9023\u7684\u529f\u80fd\uff0c\u5c07\u6211\u5011\u8981\u57f7\u884c\u7684\u4efb\u52d9\u62c6\u5206\u7d66 ESP32 \u8207 ATmega328P\u3002\u82e5\u662f\u4e4b\u5f8c\u4e0d\u719f\u6089\u7684\u8a71\uff0c\u53ef\u4ee5\u518d\u56de\u5230\u9019\u500b\u55ae\u5143\u8907\u7fd2\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Pixel:Bit \u6559\u5b78(\u4e8c) \u8981\u6559\u5927\u5bb6\u5982\u4f55\u8b93\u958b\u767c\u677f\u4e0a\u7684\u5169\u9846\u5fae\u63a7\u5236\u5668 ESP32 \u8207 ATmega328P \u76f8\u4e92\u901a\u8a0a\uff0c\u5f9e Arduino IDE \u74b0\u5883\u5efa\u7f6e\u3001\u71d2\u9304\u7bc4\u4f8b\u7a0b\u5f0f\u5230\u5be6\u969b\u64cd\u4f5c\uff0c\u8b93\u60a8\u6e05\u695a\u5730\u4e86\u89e3\u5982\u4f55\u4f7f\u7528 Pixel:Bit\u3002<\/p>\n","protected":false},"author":1,"featured_media":15440,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[274,238],"tags":[36,275,109],"table_tags":[],"_links":{"self":[{"href":"https:\/\/www.circuspi.com\/index.php\/wp-json\/wp\/v2\/posts\/14593"}],"collection":[{"href":"https:\/\/www.circuspi.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.circuspi.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.circuspi.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.circuspi.com\/index.php\/wp-json\/wp\/v2\/comments?post=14593"}],"version-history":[{"count":27,"href":"https:\/\/www.circuspi.com\/index.php\/wp-json\/wp\/v2\/posts\/14593\/revisions"}],"predecessor-version":[{"id":15816,"href":"https:\/\/www.circuspi.com\/index.php\/wp-json\/wp\/v2\/posts\/14593\/revisions\/15816"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.circuspi.com\/index.php\/wp-json\/wp\/v2\/media\/15440"}],"wp:attachment":[{"href":"https:\/\/www.circuspi.com\/index.php\/wp-json\/wp\/v2\/media?parent=14593"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.circuspi.com\/index.php\/wp-json\/wp\/v2\/categories?post=14593"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.circuspi.com\/index.php\/wp-json\/wp\/v2\/tags?post=14593"},{"taxonomy":"table_tags","embeddable":true,"href":"https:\/\/www.circuspi.com\/index.php\/wp-json\/wp\/v2\/table_tags?post=14593"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}