{"id":43093,"date":"2025-06-11T08:54:56","date_gmt":"2025-06-11T00:54:56","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/43093.html"},"modified":"2025-06-11T08:54:56","modified_gmt":"2025-06-11T00:54:56","slug":"oled%e6%98%be%e7%a4%ba%e5%b1%8f%e8%af%a6%e8%a7%a3iic%e5%8d%8f%e8%ae%ae0-96%e5%af%b8-stm32%ef%bc%89","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/43093.html","title":{"rendered":"OLED\u663e\u793a\u5c4f\u8be6\u89e3(IIC\u534f\u8bae0.96\u5bf8 STM32\uff09"},"content":{"rendered":"<h3 id=\"%C2%A0\">\u76ee\u5f55<\/h3>\n<p id=\"%C2%A0-toc\" style=\"margin-left:40px\">\u00a0\u4e00\u3001\u4ecb\u7ecd<\/p>\n<p id=\"%C2%A0%E4%BA%8C%E3%80%81%E6%A8%A1%E5%9D%97%E5%8E%9F%E7%90%86-toc\" style=\"margin-left:40px\">\u00a0\u4e8c\u3001\u6a21\u5757\u539f\u7406<\/p>\n<p id=\"1.%E5%8E%9F%E7%90%86%E5%9B%BE-toc\" style=\"margin-left:80px\">1.\u539f\u7406\u56fe<\/p>\n<p id=\"2.%E5%B7%A5%E4%BD%9C%E5%8E%9F%E7%90%86%EF%BC%9ASSD1306%E6%98%BE%E5%AD%98%E4%B8%8E%E5%91%BD%E4%BB%A4-toc\" style=\"margin-left:80px\">2.\u5de5\u4f5c\u539f\u7406&#xff1a;SSD1306\u663e\u5b58\u4e0e\u547d\u4ee4<\/p>\n<p id=\"%E4%B8%89%E3%80%81%E7%A8%8B%E5%BA%8F%E8%AE%BE%E8%AE%A1-toc\" style=\"margin-left:40px\">\u4e09\u3001\u7a0b\u5e8f\u8bbe\u8ba1<\/p>\n<p id=\"main.c%E6%96%87%E4%BB%B6-toc\" style=\"margin-left:80px\">main.c\u6587\u4ef6<\/p>\n<p id=\"oled.h%E6%96%87%E4%BB%B6-toc\" style=\"margin-left:80px\">oled.h\u6587\u4ef6<\/p>\n<p id=\"oled.c%E6%96%87%E4%BB%B6-toc\" style=\"margin-left:80px\">oled.c\u6587\u4ef6<\/p>\n<p id=\"%E5%9B%9B%E3%80%81%E5%AE%9E%E9%AA%8C%E6%95%88%E6%9E%9C%C2%A0-toc\" style=\"margin-left:40px\">\u56db\u3001\u5b9e\u9a8c\u6548\u679c\u00a0<\/p>\n<p id=\"%E4%BA%94%E3%80%81%E8%B5%84%E6%96%99%E8%8E%B7%E5%8F%96-toc\" style=\"margin-left:40px\">\u4e94\u3001\u8d44\u6599\u83b7\u53d6<\/p>\n<p id=\"%E9%A1%B9%E7%9B%AE%E5%88%86%E4%BA%AB-toc\" style=\"margin-left:80px\">\u9879\u76ee\u5206\u4eab<\/p>\n<hr id=\"hr-toc\" \/>\n<h3>\u4e00\u3001\u4ecb\u7ecd<\/h3>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"color:#2f2f2f\">OLED<\/span><span style=\"color:#2f2f2f\">\u662f<\/span><span style=\"color:#2f2f2f\">\u6709\u673a\u53d1\u5149\u4e8c\u6781\u7ba1&#xff0c;\u53c8\u79f0\u4e3a\u6709\u673a\u7535\u6fc0\u5149\u663e\u793a&#xff08;<\/span><span style=\"color:#2f2f2f\">Organic Electroluminescence Display<\/span><span style=\"color:#2f2f2f\">&#xff0c; <\/span><span style=\"color:#2f2f2f\">OLED<\/span><span style=\"color:#2f2f2f\">&#xff09;\u3002<\/span><span style=\"color:#2f2f2f\">OLED<\/span><span style=\"color:#2f2f2f\">\u7531\u4e8e\u540c\u65f6\u5177\u5907\u81ea\u53d1\u5149&#xff0c;\u4e0d\u9700\u80cc\u5149\u6e90\u3001\u5bf9\u6bd4\u5ea6\u9ad8\u3001\u539a\u5ea6\u8584\u3001\u89c6\u89d2\u5e7f\u3001\u53cd\u5e94\u901f\u5ea6\u5feb\u3001\u53ef\u7528\u4e8e\u6320\u66f2\u6027\u9762\u677f\u3001\u4f7f\u7528\u6e29\u5ea6\u8303\u56f4\u5e7f\u3001\u6784\u9020\u53ca\u5236\u7a0b\u8f83\u7b80\u5355\u7b49\u4f18\u5f02\u4e4b\u7279\u6027&#xff0c;\u88ab\u8ba4\u4e3a\u662f\u4e0b\u4e00\u4ee3\u7684\u5e73\u9762\u663e\u793a\u5668\u65b0\u5174\u5e94\u7528\u6280\u672f<\/span><\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"396\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250611005451-6848d3db36d3b.jpg\" width=\"592\" \/><\/p>\n<p>\u00a0\u4ee5\u4e0b\u662fOLED\u663e\u793a\u5c4f\u7684\u53c2\u6570&#xff1a;<\/p>\n<table cellspacing=\"0\" style=\"width:390pt\">\n<tbody>\n<tr>\n<td style=\"background-color:#f1f1f1;text-align:center;vertical-align:middle;width:137pt\">\n<p style=\"margin-left:0in;text-align:center\"><span style=\"background-color:#f1f1f1\"><span style=\"color:#333333\">\u5c3a\u5bf8<\/span><\/span><\/p>\n<\/td>\n<td style=\"text-align:center;vertical-align:middle;width:252pt\">\n<p style=\"margin-left:0in;text-align:center\"><span style=\"color:#333333\">0.96<\/span><span style=\"color:#333333\">\u5bf8<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"background-color:#f1f1f1;border-color:#bcbcbc #e0e0e0;text-align:center;vertical-align:middle;width:137pt\">\n<p style=\"margin-left:0in;text-align:center\"><span style=\"background-color:#f1f1f1\"><span style=\"color:#333333\">\u6a21\u5757\u7535\u538b<\/span><\/span><\/p>\n<\/td>\n<td style=\"text-align:center;vertical-align:middle;width:252pt\">\n<p style=\"margin-left:0in;text-align:center\"><span style=\"color:#333333\">DC&#xff1a;3~5V<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"background-color:#f1f1f1;border-color:#bcbcbc #e0e0e0;text-align:center;vertical-align:middle;width:137pt\">\n<p style=\"margin-left:0in;text-align:center\"><span style=\"background-color:#f1f1f1\"><span style=\"color:#333333\">\u5206\u8fa8\u7387<\/span><\/span><\/p>\n<\/td>\n<td style=\"text-align:center;vertical-align:middle;width:252pt\">\n<p style=\"margin-left:0in;text-align:center\"><span style=\"color:#333333\">128<\/span><span style=\"color:#333333\">\u00d7<\/span><span style=\"color:#333333\">64<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"background-color:#f1f1f1;border-color:#bcbcbc #e0e0e0;text-align:center;vertical-align:middle;width:137pt\">\n<p style=\"margin-left:0in;text-align:center\"><span style=\"background-color:#f1f1f1\"><span style=\"color:#333333\">\u9a71\u52a8<\/span><\/span><\/p>\n<\/td>\n<td style=\"text-align:center;vertical-align:middle;width:252pt\">\n<p style=\"margin-left:0in;text-align:center\"><span style=\"color:#333333\">SSD1306<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"background-color:#f1f1f1;border-color:#bcbcbc #e0e0e0;text-align:center;vertical-align:middle;width:137pt\">\n<p style=\"margin-left:0in;text-align:center\"><span style=\"background-color:#f1f1f1\"><span style=\"color:#333333\">\u7ba1\u811a\u6570<\/span><\/span><\/p>\n<\/td>\n<td style=\"text-align:center;vertical-align:middle;width:252pt\">\n<p style=\"margin-left:0in;text-align:center\"><span style=\"color:#333333\">4<\/span><span style=\"color:#333333\">\u9488<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"background-color:#f1f1f1;border-color:#bcbcbc #e0e0e0;text-align:center;vertical-align:middle;width:137pt\">\n<p style=\"margin-left:0in;text-align:center\"><span style=\"background-color:#f1f1f1\"><span style=\"color:#333333\">\u63a5\u53e3<\/span><\/span><\/p>\n<\/td>\n<td style=\"text-align:center;vertical-align:middle;width:252pt\">\n<p style=\"margin-left:0in;text-align:center\"><span style=\"color:#333333\">IIC<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"background-color:#f1f1f1;border-color:#bcbcbc #e0e0e0;text-align:center;vertical-align:middle;width:137pt\">\n<p style=\"margin-left:0in;text-align:center\"><span style=\"background-color:#f1f1f1\"><span style=\"color:#333333\">\u5de5\u4f5c\u6e29\u5ea6<\/span><\/span><\/p>\n<\/td>\n<td style=\"text-align:center;vertical-align:middle;width:252pt\">\n<p style=\"margin-left:0in;text-align:center\"><span style=\"color:#333333\">-20<\/span><span style=\"color:#333333\">\u2103<\/span><span style=\"color:#333333\">~70<\/span><span style=\"color:#333333\">\u2103<\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u54d4\u54e9\u54d4\u54e9\u89c6\u9891\u94fe\u63a5&#xff1a;<\/p>\n<p>https:\/\/www.bilibili.com\/video\/BV17Z421K7vV\/?share_source&#061;copy_web&#038;vd_source&#061;097fdeaf6b6ecfed8a9ff7119c32faf2<\/p>\n<p><span style=\"color:#fe2c24\">&#xff08;\u8d44\u6599\u5206\u4eab\u89c1\u6587\u672b&#xff09;\u00a0<\/span><\/p>\n<h3 id=\"%C2%A0%E4%BA%8C%E3%80%81%E6%A8%A1%E5%9D%97%E5%8E%9F%E7%90%86\">\u00a0\u4e8c\u3001\u6a21\u5757\u539f\u7406<\/h3>\n<h4 id=\"1.%E5%8E%9F%E7%90%86%E5%9B%BE\">1.\u539f\u7406\u56fe<\/h4>\n<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250611005451-6848d3db8b35c.png\" \/><\/p>\n<p>\u00a0\u00a0<span style=\"color:#000000\">\u4ee5\u4e0b\u4e3aOLED\u663e\u793a\u5c4f\u7684\u5f15\u811a\u63cf\u8ff0<\/span><\/p>\n<\/p>\n<table cellspacing=\"0\" style=\"width:285pt\">\n<tbody>\n<tr>\n<td style=\"background-color:#f1f1f1;text-align:center;vertical-align:middle;width:114pt\">\n<p style=\"margin-left:0in;text-align:center\"><span style=\"background-color:#f1f1f1\"><span style=\"color:#333333\">\u5f15\u811a\u540d\u79f0<\/span><\/span><\/p>\n<\/td>\n<td style=\"text-align:center;vertical-align:middle;width:171pt\">\n<p style=\"margin-left:0in;text-align:center\"><span style=\"color:#333333\">\u63cf\u8ff0<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"background-color:#f1f1f1;border-color:#bcbcbc #e0e0e0;text-align:center;vertical-align:middle;width:114pt\">\n<p style=\"margin-left:0in;text-align:center\"><span style=\"background-color:#f1f1f1\"><span style=\"color:#333333\">VCC<\/span><\/span><\/p>\n<\/td>\n<td style=\"text-align:center;vertical-align:middle;width:171pt\">\n<p style=\"margin-left:0in;text-align:center\"><span style=\"color:#333333\">\u4f9b\u7ed9\u7535\u538b<\/span><span style=\"color:#333333\">3~5V<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"background-color:#f1f1f1;border-color:#bcbcbc #e0e0e0;text-align:center;vertical-align:middle;width:114pt\">\n<p style=\"margin-left:0in;text-align:center\"><span style=\"background-color:#f1f1f1\"><span style=\"color:#333333\">SCL<\/span><\/span><\/p>\n<\/td>\n<td style=\"text-align:center;vertical-align:middle;width:171pt\">\n<p style=\"margin-left:0in;text-align:center\"><span style=\"color:#333333\">I2C<\/span><span style=\"color:#333333\">\u603b\u7ebf\u65f6\u949f\u7ebf<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"background-color:#f1f1f1;border-color:#bcbcbc #e0e0e0;text-align:center;vertical-align:middle;width:114pt\">\n<p style=\"margin-left:0in;text-align:center\"><span style=\"background-color:#f1f1f1\"><span style=\"color:#333333\">SDA<\/span><\/span><\/p>\n<\/td>\n<td style=\"text-align:center;vertical-align:middle;width:171pt\">\n<p style=\"margin-left:0in;text-align:center\"><span style=\"color:#333333\">I2C<\/span><span style=\"color:#333333\">\u603b\u7ebf\u6570\u636e\u7ebf<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"background-color:#f1f1f1;border-color:#bcbcbc #e0e0e0;text-align:center;vertical-align:middle;width:114pt\">\n<p style=\"margin-left:0in;text-align:center\"><span style=\"background-color:#f1f1f1\"><span style=\"color:#333333\">GND<\/span><\/span><\/p>\n<\/td>\n<td style=\"text-align:center;vertical-align:middle;width:171pt\">\n<p style=\"margin-left:0in;text-align:center\"><span style=\"color:#333333\">\u7535\u6e90\u5730<\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4 id=\"2.%E5%B7%A5%E4%BD%9C%E5%8E%9F%E7%90%86%EF%BC%9ASSD1306%E6%98%BE%E5%AD%98%E4%B8%8E%E5%91%BD%E4%BB%A4\">2.<span style=\"color:#2f2f2f\">\u5de5\u4f5c\u539f\u7406&#xff1a;<\/span><span style=\"color:#2f2f2f\">SSD1306<\/span><span style=\"color:#2f2f2f\">\u663e\u5b58\u4e0e\u547d\u4ee4<\/span><\/h4>\n<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250611005454-6848d3def025d.png\" \/><\/p>\n<p style=\"margin-left:0in;text-align:left\"><span style=\"color:#2f2f2f\">SSD1306<\/span><span style=\"color:#2f2f2f\">\u7684\u663e\u5b58\u603b\u5171\u4e3a<\/span><span style=\"color:#2f2f2f\">128*64bit<\/span><span style=\"color:#2f2f2f\">\u5927\u5c0f&#xff0c;<\/span><span style=\"color:#2f2f2f\">\u5176<\/span><span style=\"color:#2f2f2f\">\u5c06\u8fd9\u4e9b\u663e\u5b58\u5206\u4e3a\u4e86<\/span><span style=\"color:#2f2f2f\">8<\/span><span style=\"color:#2f2f2f\">\u9875<\/span><span style=\"color:#2f2f2f\">\u3002<\/span><span style=\"color:#2f2f2f\">\u6bcf\u9875\u5305\u542b\u4e86<\/span><span style=\"color:#2f2f2f\">128<\/span><span style=\"color:#2f2f2f\">\u4e2a\u5b57\u8282&#xff0c;\u603b\u5171<\/span><span style=\"color:#2f2f2f\">8<\/span><span style=\"color:#2f2f2f\">\u9875&#xff0c;\u8fd9\u6837\u521a\u597d\u662f<\/span><span style=\"color:#2f2f2f\">128*64<\/span><span style=\"color:#2f2f2f\">\u7684\u70b9\u9635\u5927\u5c0f<\/span><span style=\"color:#2f2f2f\">\u3002<\/span><\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250611005455-6848d3df0a937.png\" \/><\/p>\n<ul>\n<li>\n<p>   <span style=\"color:#2f2f2f\">\u547d\u4ee4<\/span><br \/>\n   <span style=\"color:#2f2f2f\">0X81<\/span><br \/>\n   <span style=\"color:#2f2f2f\">&#xff1a;<\/span><br \/>\n   <span style=\"color:#2f2f2f\">\u8bbe\u7f6e\u5bf9\u6bd4\u5ea6<\/span><br \/>\n   <span style=\"color:#2f2f2f\">\u3002<\/span><br \/>\n   <span style=\"color:#2f2f2f\">\u5305\u542b\u4e24\u4e2a\u5b57\u8282&#xff0c;\u7b2c\u4e00\u4e2a<\/span><br \/>\n   <span style=\"color:#2f2f2f\">0X81<\/span><br \/>\n   <span style=\"color:#2f2f2f\">\u4e3a\u547d\u4ee4&#xff0c;\u968f\u540e\u53d1\u9001\u7684\u4e00\u4e2a\u5b57\u8282\u4e3a\u8981\u8bbe\u7f6e\u7684\u5bf9\u6bd4\u5ea6\u7684\u503c\u3002\u8fd9\u4e2a\u503c\u8bbe\u7f6e\u5f97\u8d8a\u5927\u5c4f\u5e55\u5c31\u8d8a\u4eae\u3002<\/span>\n   <\/li>\n<li>\n<p>   <span style=\"color:#2f2f2f\">\u547d\u4ee40XAE\/0XAF<\/span><br \/>\n   <span style=\"color:#2f2f2f\">&#xff1a;<\/span><br \/>\n   <span style=\"color:#2f2f2f\">0XAE<\/span><br \/>\n   <span style=\"color:#2f2f2f\">\u4e3a\u5173\u95ed\u663e\u793a\u547d\u4ee4&#xff1b;<\/span><br \/>\n   <span style=\"color:#2f2f2f\">0XAF<\/span><br \/>\n   <span style=\"color:#2f2f2f\">\u4e3a\u5f00\u542f\u663e\u793a\u547d\u4ee4\u3002<\/span>\n   <\/li>\n<li>\n<p>   <span style=\"color:#2f2f2f\">\u547d\u4ee40XB0~B7<\/span><br \/>\n   <span style=\"color:#2f2f2f\">&#xff1a;<\/span><br \/>\n   <span style=\"color:#2f2f2f\">\u7528\u4e8e\u8bbe\u7f6e\u9875\u5730\u5740&#xff0c;\u5176\u4f4e\u4e09\u4f4d\u7684\u503c\u5bf9\u5e94\u7740<\/span><br \/>\n   <span style=\"color:#2f2f2f\">GRAM<\/span><br \/>\n   <span style=\"color:#2f2f2f\">\u7684\u9875\u5730\u5740\u3002<\/span>\n   <\/li>\n<li>\n<p>   <span style=\"color:#2f2f2f\">\u547d\u4ee40X00~0X0F<\/span><br \/>\n   <span style=\"color:#2f2f2f\">&#xff1a;<\/span><br \/>\n   <span style=\"color:#2f2f2f\">\u7528\u4e8e\u8bbe\u7f6e\u663e\u793a\u65f6\u7684\u8d77\u59cb\u5217\u5730\u5740\u4f4e\u56db\u4f4d\u3002<\/span>\n   <\/li>\n<li>\n<p>   <span style=\"color:#2f2f2f\">\u547d\u4ee40X10~0X1F<\/span><br \/>\n   <span style=\"color:#2f2f2f\">&#xff1a;<\/span><br \/>\n   <span style=\"color:#2f2f2f\">\u7528\u4e8e\u8bbe\u7f6e\u663e\u793a\u65f6\u7684\u8d77\u59cb\u5217\u5730\u5740\u9ad8\u56db\u4f4d\u3002<\/span>\n   <\/li>\n<\/ul>\n<h3 id=\"%E4%B8%89%E3%80%81%E7%A8%8B%E5%BA%8F%E8%AE%BE%E8%AE%A1\">\u4e09\u3001\u7a0b\u5e8f\u8bbe\u8ba1<\/h3>\n<p style=\"margin-left:0in;text-align:left\"><span style=\"color:#2f2f2f\">\u4f7f\u7528<\/span><span style=\"color:#2f2f2f\">STM32F103C8T6<\/span><span style=\"color:#2f2f2f\">\u5c06<\/span><span style=\"color:#ff0000\">\u4e2d\u82f1\u6587\u5b57\u7b26<\/span><span style=\"color:#2f2f2f\">\u3001<\/span><span style=\"color:#ff0000\">\u6570\u5b57<\/span><span style=\"color:#2f2f2f\">\u548c<\/span><span style=\"color:#ff0000\">\u56fe\u7247<\/span><span style=\"color:#2f2f2f\">\u663e\u793a\u5728<\/span><span style=\"color:#2f2f2f\">OLED<\/span><span style=\"color:#2f2f2f\">\u663e\u793a\u5c4f\u4e0a<\/span><\/p>\n<h4 id=\"main.c%E6%96%87%E4%BB%B6\">main.c\u6587\u4ef6<\/h4>\n<p>#include &#034;stm32f10x.h&#034;<br \/>\n#include &#034;led.h&#034;<br \/>\n#include &#034;usart.h&#034;<br \/>\n#include &#034;delay.h&#034;<br \/>\n#include &#034;dht11.h&#034;<br \/>\n#include &#034;oled.h&#034;<br \/>\n#include &#034;bmp.h&#034;<\/p>\n<p>\/*****************\u8fb0\u54e5\u5355\u7247\u673a\u8bbe\u8ba1******************<br \/>\nSTM32<br \/>\n * \u9879\u76ee:OLED\u663e\u793a\u5c4f\u5b9e\u9a8c<br \/>\n * \u7248\u672c: V1.0<br \/>\n * \u65e5\u671f: 2024.8.7<br \/>\n * MCU:STM32F103C8T6<br \/>\n * \u63a5\u53e3:\u53c2\u770boled.h<br \/>\n * BILIBILI:\u8fb0\u54e5\u5355\u7247\u673a\u8bbe\u8ba1<br \/>\n * CSDN:\u8fb0\u54e5\u5355\u7247\u673a\u8bbe\u8ba1<br \/>\n * \u4f5c\u8005:\u8fb0\u54e5 <\/p>\n<p>**********************BEGIN***********************\/<\/p>\n<p>int main(void)<br \/>\n{ <\/p>\n<p>  SystemInit();\/\/\u914d\u7f6e\u7cfb\u7edf\u65f6\u949f\u4e3a72M<br \/>\ndelay_init(72);<br \/>\nLED_Init();<br \/>\nLED_On();<br \/>\nUSART1_Config();\/\/\u4e32\u53e3\u521d\u59cb\u5316<\/p>\n<p>OLED_Init();<\/p>\n<p>printf(&#034;Start \\\\n&#034;);<br \/>\ndelay_ms(1000);<\/p>\n<p>\/\/OLED_ShowChinese(u8 x,u8 y,u8 num,u8 size1,u8 mode)<br \/>\n\/\/x,y:\u8d77\u70b9\u5750\u6807 num:\u6c49\u5b57\u5bf9\u5e94\u7684\u5e8f\u53f7 mode:0,\u53cd\u8272\u663e\u793a;1,\u6b63\u5e38\u663e\u793a<br \/>\nOLED_ShowChinese(0,32,0,16,1); \/\/\u4f60<br \/>\nOLED_ShowChinese(32,32,1,16,1);\/\/\u597d<br \/>\nOLED_ShowChinese(64,32,2,16,1);\/\/\u4e16<br \/>\nOLED_ShowChinese(96,32,3,16,1);\/\/\u754c<\/p>\n<p>\/\/OLED_ShowString(u8 x,u8 y,u8 *chr,u8 size1,u8 mode);<br \/>\n\/\/x,y:\u8d77\u70b9\u5750\u6807 size1:\u5b57\u4f53\u5927\u5c0f *chr:\u5b57\u7b26\u4e32\u8d77\u59cb\u5730\u5740 mode:0,\u53cd\u8272\u663e\u793a;1,\u6b63\u5e38\u663e\u793a<br \/>\n\/\/OLED_ShowString(0,16,&#034;HELLO WORLD!&#034;,16,1);<\/p>\n<p>\/\/OLED_ShowNum(u8 x,u8 y,u32 num,u8 len,u8 size1,u8 mode);<br \/>\n\/\/x,y :\u8d77\u70b9\u5750\u6807 num :\u8981\u663e\u793a\u7684\u6570\u5b57 len :\u6570\u5b57\u7684\u4f4d\u6570 size:\u5b57\u4f53\u5927\u5c0f mode:0,\u53cd\u8272\u663e\u793a;1,\u6b63\u5e38\u663e\u793a<br \/>\n\/\/OLED_ShowNum(0,32,666,3,24,1);<\/p>\n<p>\/\/OLED_Clear();<br \/>\n\/\/OLED_ShowPicture(u8 x,u8 y,u8 sizex,u8 sizey,u8 BMP[],u8 mode)<br \/>\n\/\/x,y&#xff1a;\u8d77\u70b9\u5750\u6807 sizex,sizey,\u56fe\u7247\u957f\u5bbd BMP[]&#xff1a;\u8981\u5199\u5165\u7684\u56fe\u7247\u6570\u7ec4 mode:0,\u53cd\u8272\u663e\u793a;1,\u6b63\u5e38\u663e\u793a<br \/>\n\/\/OLED_ShowPicture(0,0,128,64,BMP4,0);<br \/>\n  while (1)<br \/>\n  {<br \/>\nLED_Toggle();<br \/>\ndelay_ms(500);<br \/>\n  }<br \/>\n} <\/p>\n<h4 id=\"oled.h%E6%96%87%E4%BB%B6\">oled.h\u6587\u4ef6<\/h4>\n<p>#ifndef __OLED_H<br \/>\n#define __OLED_H<br \/>\n#include &#034;sys.h&#034;<br \/>\n#include &#034;stdlib.h&#034;<\/p>\n<p>\/*****************\u8fb0\u54e5\u5355\u7247\u673a\u8bbe\u8ba1******************<br \/>\nSTM32<br \/>\n * \u6587\u4ef6:OLED\u663e\u793a\u5c4fh\u6587\u4ef6<br \/>\n * \u7248\u672c: V1.0<br \/>\n * \u65e5\u671f: 2024.8.7<br \/>\n * MCU:STM32F103C8T6<br \/>\n * \u63a5\u53e3:\u89c1\u4ee3\u7801<br \/>\n * BILIBILI:\u8fb0\u54e5\u5355\u7247\u673a\u8bbe\u8ba1<br \/>\n * CSDN:\u8fb0\u54e5\u5355\u7247\u673a\u8bbe\u8ba1<br \/>\n * \u4f5c\u8005:\u8fb0\u54e5 <\/p>\n<p>**********************BEGIN***********************\/<\/p>\n<p>\/\/&#8212;&#8212;&#8212;&#8212;&#8212;-OLED\u7aef\u53e3\u5b9a\u4e49&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n\/***************\u6839\u636e\u81ea\u5df1\u9700\u6c42\u66f4\u6539****************\/<br \/>\n#define OLED_SCL_PROT  GPIOB<br \/>\n#define OLED_SCL_PINGPIO_Pin_11<br \/>\n#define OLED_SCL_GPIO_CLK   RCC_APB2Periph_GPIOB<br \/>\n#define OLED_SDA_PROT  GPIOB<br \/>\n#define OLED_SDA_PINGPIO_Pin_10<br \/>\n#define OLED_SDA_GPIO_CLK   RCC_APB2Periph_GPIOB<br \/>\n\/*********************END**********************\/<\/p>\n<p>#define OLED_SCL_Clr() GPIO_ResetBits(OLED_SCL_PROT,OLED_SCL_PIN)\/\/SCL<br \/>\n#define OLED_SCL_Set() GPIO_SetBits(OLED_SCL_PROT,OLED_SCL_PIN)<\/p>\n<p>#define OLED_SDA_Clr() GPIO_ResetBits(OLED_SDA_PROT,OLED_SDA_PIN)\/\/DIN<br \/>\n#define OLED_SDA_Set() GPIO_SetBits(OLED_SDA_PROT,OLED_SDA_PIN)<\/p>\n<p>#define OLED_CMD  0\/\/\u5199\u547d\u4ee4<br \/>\n#define OLED_DATA 1\/\/\u5199\u6570\u636e<\/p>\n<p>void OLED_ClearPoint(u8 x,u8 y);<br \/>\nvoid OLED_ColorTurn(u8 i);<br \/>\nvoid OLED_DisplayTurn(u8 i);<br \/>\nvoid OLED_I2C_Start(void);<br \/>\nvoid OLED_I2C_Stop(void);<br \/>\nvoid OLED_I2C_WaitAck(void);<br \/>\nvoid OLED_Send_Byte(u8 dat);<br \/>\nvoid OLED_WR_Byte(u8 dat,u8 mode);<br \/>\nvoid OLED_DisPlay_On(void);<br \/>\nvoid OLED_DisPlay_Off(void);<br \/>\nvoid OLED_Refresh(void);<br \/>\nvoid OLED_Clear(void);<br \/>\nvoid OLED_DrawPoint(u8 x,u8 y,u8 t);<br \/>\nvoid OLED_DrawLine(u8 x1,u8 y1,u8 x2,u8 y2,u8 mode);<br \/>\nvoid OLED_DrawCircle(u8 x,u8 y,u8 r);<br \/>\nvoid OLED_ShowChar(u8 x,u8 y,u8 chr,u8 size1,u8 mode);<br \/>\nvoid OLED_ShowChar6x8(u8 x,u8 y,u8 chr,u8 mode);<br \/>\nvoid OLED_ShowString(u8 x,u8 y,u8 *chr,u8 size1,u8 mode);<br \/>\nvoid OLED_ShowNum(u8 x,u8 y,u32 num,u8 len,u8 size1,u8 mode);<br \/>\nvoid OLED_ShowChinese(u8 x,u8 y,u8 num,u8 size1,u8 mode);<br \/>\nvoid OLED_ScrollDisplay(u8 num,u8 space,u8 mode);<br \/>\nvoid OLED_ShowPicture(u8 x,u8 y,u8 sizex,u8 sizey,u8 BMP[],u8 mode);<br \/>\nvoid OLED_Init(void);<\/p>\n<p>#endif<\/p>\n<h4 id=\"oled.c%E6%96%87%E4%BB%B6\">oled.c\u6587\u4ef6<\/h4>\n<p>#include &#034;oled.h&#034;<br \/>\n#include &#034;stdlib.h&#034;<br \/>\n#include &#034;oledfont.h&#034;<br \/>\n#include &#034;delay.h&#034;<\/p>\n<p>\/*****************\u8fb0\u54e5\u5355\u7247\u673a\u8bbe\u8ba1******************<br \/>\nSTM32<br \/>\n * \u6587\u4ef6:OLED\u663e\u793a\u5c4fc\u6587\u4ef6<br \/>\n * \u7248\u672c: V1.0<br \/>\n * \u65e5\u671f: 2024.8.7<br \/>\n * MCU:STM32F103C8T6<br \/>\n * \u63a5\u53e3:\u89c1\u4ee3\u7801<br \/>\n * BILIBILI:\u8fb0\u54e5\u5355\u7247\u673a\u8bbe\u8ba1<br \/>\n * CSDN:\u8fb0\u54e5\u5355\u7247\u673a\u8bbe\u8ba1<br \/>\n * \u4f5c\u8005:\u8fb0\u54e5 <\/p>\n<p>**********************BEGIN***********************\/<\/p>\n<p>u8 OLED_GRAM[144][8];<\/p>\n<p>\/\/\u53cd\u663e\u51fd\u6570<br \/>\nvoid OLED_ColorTurn(u8 i)<br \/>\n{<br \/>\nif(i&#061;&#061;0)<br \/>\n{<br \/>\nOLED_WR_Byte(0xA6,OLED_CMD);\/\/\u6b63\u5e38\u663e\u793a<br \/>\n}<br \/>\nif(i&#061;&#061;1)<br \/>\n{<br \/>\nOLED_WR_Byte(0xA7,OLED_CMD);\/\/\u53cd\u8272\u663e\u793a<br \/>\n}<br \/>\n}<\/p>\n<p>\/\/\u5c4f\u5e55\u65cb\u8f6c180\u5ea6<br \/>\nvoid OLED_DisplayTurn(u8 i)<br \/>\n{<br \/>\nif(i&#061;&#061;0)<br \/>\n{<br \/>\nOLED_WR_Byte(0xC8,OLED_CMD);\/\/\u6b63\u5e38\u663e\u793a<br \/>\nOLED_WR_Byte(0xA1,OLED_CMD);<br \/>\n}<br \/>\nif(i&#061;&#061;1)<br \/>\n{<br \/>\nOLED_WR_Byte(0xC0,OLED_CMD);\/\/\u53cd\u8f6c\u663e\u793a<br \/>\nOLED_WR_Byte(0xA0,OLED_CMD);<br \/>\n}<br \/>\n}<\/p>\n<p>\/\/\u5ef6\u65f6<br \/>\nvoid IIC_delay(void)<br \/>\n{<br \/>\nu8 t&#061;3;<br \/>\nwhile(t&#8211;);<br \/>\n}<\/p>\n<p>\/\/\u8d77\u59cb\u4fe1\u53f7<br \/>\nvoid OLED_I2C_Start(void)<br \/>\n{<br \/>\nOLED_SDA_Set();<br \/>\nOLED_SCL_Set();<br \/>\nIIC_delay();<br \/>\nOLED_SDA_Clr();<br \/>\nIIC_delay();<br \/>\nOLED_SCL_Clr();<br \/>\nIIC_delay();<br \/>\n}<\/p>\n<p>\/\/\u7ed3\u675f\u4fe1\u53f7<br \/>\nvoid OLED_I2C_Stop(void)<br \/>\n{<br \/>\nOLED_SDA_Clr();<br \/>\nOLED_SCL_Set();<br \/>\nIIC_delay();<br \/>\nOLED_SDA_Set();<br \/>\n}<\/p>\n<p>\/\/\u7b49\u5f85\u4fe1\u53f7\u54cd\u5e94<br \/>\nvoid OLED_I2C_WaitAck(void) \/\/\u6d4b\u6570\u636e\u4fe1\u53f7\u7684\u7535\u5e73<br \/>\n{<br \/>\nOLED_SDA_Set();<br \/>\nIIC_delay();<br \/>\nOLED_SCL_Set();<br \/>\nIIC_delay();<br \/>\nOLED_SCL_Clr();<br \/>\nIIC_delay();<br \/>\n}<\/p>\n<p>\/\/\u5199\u5165\u4e00\u4e2a\u5b57\u8282<br \/>\nvoid OLED_Send_Byte(u8 dat)<br \/>\n{<br \/>\nu8 i;<br \/>\nfor(i&#061;0;i&lt;8;i&#043;&#043;)<br \/>\n{<br \/>\nif(dat&amp;0x80)\/\/\u5c06dat\u76848\u4f4d\u4ece\u6700\u9ad8\u4f4d\u4f9d\u6b21\u5199\u5165<br \/>\n{<br \/>\nOLED_SDA_Set();<br \/>\n    }<br \/>\nelse<br \/>\n{<br \/>\nOLED_SDA_Clr();<br \/>\n    }<br \/>\nIIC_delay();<br \/>\nOLED_SCL_Set();<br \/>\nIIC_delay();<br \/>\nOLED_SCL_Clr();\/\/\u5c06\u65f6\u949f\u4fe1\u53f7\u8bbe\u7f6e\u4e3a\u4f4e\u7535\u5e73<br \/>\ndat&lt;&lt;&#061;1;<br \/>\n  }<br \/>\n}<\/p>\n<p>\/\/\u53d1\u9001\u4e00\u4e2a\u5b57\u8282<br \/>\n\/\/mode:\u6570\u636e\/\u547d\u4ee4\u6807\u5fd7 0,\u8868\u793a\u547d\u4ee4;1,\u8868\u793a\u6570\u636e;<br \/>\nvoid OLED_WR_Byte(u8 dat,u8 mode)<br \/>\n{<br \/>\nOLED_I2C_Start();<br \/>\nOLED_Send_Byte(0x78);<br \/>\nOLED_I2C_WaitAck();<br \/>\nif(mode){OLED_Send_Byte(0x40);}<br \/>\n  else{OLED_Send_Byte(0x00);}<br \/>\nOLED_I2C_WaitAck();<br \/>\nOLED_Send_Byte(dat);<br \/>\nOLED_I2C_WaitAck();<br \/>\nOLED_I2C_Stop();<br \/>\n}<\/p>\n<p>\/\/\u5f00\u542fOLED\u663e\u793a<br \/>\nvoid OLED_DisPlay_On(void)<br \/>\n{<br \/>\nOLED_WR_Byte(0x8D,OLED_CMD);\/\/\u7535\u8377\u6cf5\u4f7f\u80fd<br \/>\nOLED_WR_Byte(0x14,OLED_CMD);\/\/\u5f00\u542f\u7535\u8377\u6cf5<br \/>\nOLED_WR_Byte(0xAF,OLED_CMD);\/\/\u70b9\u4eae\u5c4f\u5e55<br \/>\n}<\/p>\n<p>\/\/\u5173\u95edOLED\u663e\u793a<br \/>\nvoid OLED_DisPlay_Off(void)<br \/>\n{<br \/>\nOLED_WR_Byte(0x8D,OLED_CMD);\/\/\u7535\u8377\u6cf5\u4f7f\u80fd<br \/>\nOLED_WR_Byte(0x10,OLED_CMD);\/\/\u5173\u95ed\u7535\u8377\u6cf5<br \/>\nOLED_WR_Byte(0xAE,OLED_CMD);\/\/\u5173\u95ed\u5c4f\u5e55<br \/>\n}<\/p>\n<p>\/\/\u66f4\u65b0\u663e\u5b58\u5230OLED<br \/>\nvoid OLED_Refresh(void)<br \/>\n{<br \/>\nu8 i,n;<br \/>\nfor(i&#061;0;i&lt;8;i&#043;&#043;)<br \/>\n{<br \/>\nOLED_WR_Byte(0xb0&#043;i,OLED_CMD); \/\/\u8bbe\u7f6e\u884c\u8d77\u59cb\u5730\u5740<br \/>\nOLED_WR_Byte(0x00,OLED_CMD);   \/\/\u8bbe\u7f6e\u4f4e\u5217\u8d77\u59cb\u5730\u5740<br \/>\nOLED_WR_Byte(0x10,OLED_CMD);   \/\/\u8bbe\u7f6e\u9ad8\u5217\u8d77\u59cb\u5730\u5740<br \/>\nOLED_I2C_Start();<br \/>\nOLED_Send_Byte(0x78);<br \/>\nOLED_I2C_WaitAck();<br \/>\nOLED_Send_Byte(0x40);<br \/>\nOLED_I2C_WaitAck();<br \/>\nfor(n&#061;0;n&lt;128;n&#043;&#043;)<br \/>\n{<br \/>\nOLED_Send_Byte(OLED_GRAM[n][i]);<br \/>\nOLED_I2C_WaitAck();<br \/>\n}<br \/>\nOLED_I2C_Stop();<br \/>\n  }<br \/>\n}<br \/>\n\/\/\u6e05\u5c4f\u51fd\u6570<br \/>\nvoid OLED_Clear(void)<br \/>\n{<br \/>\nu8 i,n;<br \/>\nfor(i&#061;0;i&lt;8;i&#043;&#043;)<br \/>\n{<br \/>\n   for(n&#061;0;n&lt;128;n&#043;&#043;)<br \/>\n{<br \/>\n OLED_GRAM[n][i]&#061;0;\/\/\u6e05\u9664\u6240\u6709\u6570\u636e<br \/>\n}<br \/>\n  }<br \/>\nOLED_Refresh();\/\/\u66f4\u65b0\u663e\u793a<br \/>\n}<\/p>\n<p>\/\/\u753b\u70b9<br \/>\n\/\/x:0~127<br \/>\n\/\/y:0~63<br \/>\n\/\/t:1 \u586b\u5145 0,\u6e05\u7a7a<br \/>\nvoid OLED_DrawPoint(u8 x,u8 y,u8 t)<br \/>\n{<br \/>\nu8 i,m,n;<br \/>\ni&#061;y\/8;<br \/>\nm&#061;y%8;<br \/>\nn&#061;1&lt;&lt;m;<br \/>\nif(t){OLED_GRAM[x][i]|&#061;n;}<br \/>\nelse<br \/>\n{<br \/>\nOLED_GRAM[x][i]&#061;~OLED_GRAM[x][i];<br \/>\nOLED_GRAM[x][i]|&#061;n;<br \/>\nOLED_GRAM[x][i]&#061;~OLED_GRAM[x][i];<br \/>\n}<br \/>\n\/\/OLED_Refresh();<br \/>\n}<\/p>\n<p>\/\/\u753b\u7ebf<br \/>\n\/\/x1,y1:\u8d77\u70b9\u5750\u6807<br \/>\n\/\/x2,y2:\u7ed3\u675f\u5750\u6807<br \/>\nvoid OLED_DrawLine(u8 x1,u8 y1,u8 x2,u8 y2,u8 mode)<br \/>\n{<br \/>\nu16 t;<br \/>\nint xerr&#061;0,yerr&#061;0,delta_x,delta_y,distance;<br \/>\nint incx,incy,uRow,uCol;<br \/>\ndelta_x&#061;x2-x1; \/\/\u8ba1\u7b97\u5750\u6807\u589e\u91cf<br \/>\ndelta_y&#061;y2-y1;<br \/>\nuRow&#061;x1;\/\/\u753b\u7ebf\u8d77\u70b9\u5750\u6807<br \/>\nuCol&#061;y1;<br \/>\nif(delta_x&gt;0)incx&#061;1; \/\/\u8bbe\u7f6e\u5355\u6b65\u65b9\u5411<br \/>\nelse if (delta_x&#061;&#061;0)incx&#061;0;\/\/\u5782\u76f4\u7ebf<br \/>\nelse {incx&#061;-1;delta_x&#061;-delta_x;}<br \/>\nif(delta_y&gt;0)incy&#061;1;<br \/>\nelse if (delta_y&#061;&#061;0)incy&#061;0;\/\/\u6c34\u5e73\u7ebf<br \/>\nelse {incy&#061;-1;delta_y&#061;-delta_x;}<br \/>\nif(delta_x&gt;delta_y)distance&#061;delta_x; \/\/\u9009\u53d6\u57fa\u672c\u589e\u91cf\u5750\u6807\u8f74<br \/>\nelse distance&#061;delta_y;<br \/>\nfor(t&#061;0;t&lt;distance&#043;1;t&#043;&#043;)<br \/>\n{<br \/>\nOLED_DrawPoint(uRow,uCol,mode);\/\/\u753b\u70b9<br \/>\nxerr&#043;&#061;delta_x;<br \/>\nyerr&#043;&#061;delta_y;<br \/>\nif(xerr&gt;distance)<br \/>\n{<br \/>\nxerr-&#061;distance;<br \/>\nuRow&#043;&#061;incx;<br \/>\n}<br \/>\nif(yerr&gt;distance)<br \/>\n{<br \/>\nyerr-&#061;distance;<br \/>\nuCol&#043;&#061;incy;<br \/>\n}<br \/>\n}<br \/>\n\/\/OLED_Refresh();<br \/>\n}<br \/>\n\/\/x,y:\u5706\u5fc3\u5750\u6807<br \/>\n\/\/r:\u5706\u7684\u534a\u5f84<br \/>\nvoid OLED_DrawCircle(u8 x,u8 y,u8 r)<br \/>\n{<br \/>\nint a, b,num;<br \/>\n    a &#061; 0;<br \/>\n    b &#061; r;<br \/>\n    while(2 * b * b &gt;&#061; r * r)<br \/>\n    {<br \/>\n        OLED_DrawPoint(x &#043; a, y &#8211; b,1);<br \/>\n        OLED_DrawPoint(x &#8211; a, y &#8211; b,1);<br \/>\n        OLED_DrawPoint(x &#8211; a, y &#043; b,1);<br \/>\n        OLED_DrawPoint(x &#043; a, y &#043; b,1);<\/p>\n<p>        OLED_DrawPoint(x &#043; b, y &#043; a,1);<br \/>\n        OLED_DrawPoint(x &#043; b, y &#8211; a,1);<br \/>\n        OLED_DrawPoint(x &#8211; b, y &#8211; a,1);<br \/>\n        OLED_DrawPoint(x &#8211; b, y &#043; a,1);<\/p>\n<p>        a&#043;&#043;;<br \/>\n        num &#061; (a * a &#043; b * b) &#8211; r*r;\/\/\u8ba1\u7b97\u753b\u7684\u70b9\u79bb\u5706\u5fc3\u7684\u8ddd\u79bb<br \/>\n        if(num &gt; 0)<br \/>\n        {<br \/>\n            b&#8211;;<br \/>\n            a&#8211;;<br \/>\n        }<br \/>\n    }<br \/>\n\/\/OLED_Refresh();<br \/>\n}<\/p>\n<p>\/\/\u5728\u6307\u5b9a\u4f4d\u7f6e\u663e\u793a\u4e00\u4e2a\u5b57\u7b26,\u5305\u62ec\u90e8\u5206\u5b57\u7b26<br \/>\n\/\/x:0~127<br \/>\n\/\/y:0~63<br \/>\n\/\/size1:\u9009\u62e9\u5b57\u4f53 6&#215;8\/6&#215;12\/8&#215;16\/12&#215;24<br \/>\n\/\/mode:0,\u53cd\u8272\u663e\u793a;1,\u6b63\u5e38\u663e\u793a<br \/>\nvoid OLED_ShowChar(u8 x,u8 y,u8 chr,u8 size1,u8 mode)<br \/>\n{<br \/>\nu8 i,m,temp,size2,chr1;<br \/>\nu8 x0&#061;x,y0&#061;y;<br \/>\nif(size1&#061;&#061;8)size2&#061;6;<br \/>\nelse size2&#061;(size1\/8&#043;((size1%8)?1:0))*(size1\/2);  \/\/\u5f97\u5230\u5b57\u4f53\u4e00\u4e2a\u5b57\u7b26\u5bf9\u5e94\u70b9\u9635\u96c6\u6240\u5360\u7684\u5b57\u8282\u6570<br \/>\nchr1&#061;chr-&#039; &#039;;  \/\/\u8ba1\u7b97\u504f\u79fb\u540e\u7684\u503c<br \/>\nfor(i&#061;0;i&lt;size2;i&#043;&#043;)<br \/>\n{<br \/>\nif(size1&#061;&#061;8)<br \/>\n  {temp&#061;asc2_0806[chr1][i];} \/\/\u8c03\u75280806\u5b57\u4f53<br \/>\nelse if(size1&#061;&#061;12)<br \/>\n        {temp&#061;asc2_1206[chr1][i];} \/\/\u8c03\u75281206\u5b57\u4f53<br \/>\nelse if(size1&#061;&#061;16)<br \/>\n        {temp&#061;asc2_1608[chr1][i];} \/\/\u8c03\u75281608\u5b57\u4f53<br \/>\nelse if(size1&#061;&#061;24)<br \/>\n        {temp&#061;asc2_2412[chr1][i];} \/\/\u8c03\u75282412\u5b57\u4f53<br \/>\nelse return;<br \/>\nfor(m&#061;0;m&lt;8;m&#043;&#043;)<br \/>\n{<br \/>\nif(temp&amp;0x01)OLED_DrawPoint(x,y,mode);<br \/>\nelse OLED_DrawPoint(x,y,!mode);<br \/>\ntemp&gt;&gt;&#061;1;<br \/>\ny&#043;&#043;;<br \/>\n}<br \/>\nx&#043;&#043;;<br \/>\nif((size1!&#061;8)&amp;&amp;((x-x0)&#061;&#061;size1\/2))<br \/>\n{x&#061;x0;y0&#061;y0&#043;8;}<br \/>\ny&#061;y0;<br \/>\n  }<br \/>\nOLED_Refresh();<br \/>\n}<\/p>\n<p>\/\/\u663e\u793a\u5b57\u7b26\u4e32<br \/>\n\/\/x,y:\u8d77\u70b9\u5750\u6807<br \/>\n\/\/size1:\u5b57\u4f53\u5927\u5c0f<br \/>\n\/\/*chr:\u5b57\u7b26\u4e32\u8d77\u59cb\u5730\u5740<br \/>\n\/\/mode:0,\u53cd\u8272\u663e\u793a;1,\u6b63\u5e38\u663e\u793a<br \/>\nvoid OLED_ShowString(u8 x,u8 y,u8 *chr,u8 size1,u8 mode)<br \/>\n{<br \/>\nwhile((*chr&gt;&#061;&#039; &#039;)&amp;&amp;(*chr&lt;&#061;&#039;~&#039;))\/\/\u5224\u65ad\u662f\u4e0d\u662f\u975e\u6cd5\u5b57\u7b26!<br \/>\n{<br \/>\nOLED_ShowChar(x,y,*chr,size1,mode);<br \/>\nif(size1&#061;&#061;8)x&#043;&#061;6;<br \/>\nelse x&#043;&#061;size1\/2;<br \/>\nchr&#043;&#043;;<br \/>\n  }<br \/>\nOLED_Refresh();<br \/>\n}<\/p>\n<p>\/\/m^n<br \/>\nu32 OLED_Pow(u8 m,u8 n)<br \/>\n{<br \/>\nu32 result&#061;1;<br \/>\nwhile(n&#8211;)<br \/>\n{<br \/>\n  result*&#061;m;<br \/>\n}<br \/>\nreturn result;<br \/>\n}<\/p>\n<p>\/\/\u663e\u793a\u6570\u5b57<br \/>\n\/\/x,y :\u8d77\u70b9\u5750\u6807<br \/>\n\/\/num :\u8981\u663e\u793a\u7684\u6570\u5b57<br \/>\n\/\/len :\u6570\u5b57\u7684\u4f4d\u6570<br \/>\n\/\/size:\u5b57\u4f53\u5927\u5c0f<br \/>\n\/\/mode:0,\u53cd\u8272\u663e\u793a;1,\u6b63\u5e38\u663e\u793a<br \/>\nvoid OLED_ShowNum(u8 x,u8 y,u32 num,u8 len,u8 size1,u8 mode)<br \/>\n{<br \/>\nu8 t,temp,m&#061;0;<br \/>\nif(size1&#061;&#061;8)m&#061;2;<br \/>\nfor(t&#061;0;t&lt;len;t&#043;&#043;)<br \/>\n{<br \/>\ntemp&#061;(num\/OLED_Pow(10,len-t-1))%10;<br \/>\nif(temp&#061;&#061;0)<br \/>\n{<br \/>\nOLED_ShowChar(x&#043;(size1\/2&#043;m)*t,y,&#039;0&#039;,size1,mode);<br \/>\n      }<br \/>\nelse<br \/>\n{<br \/>\n  OLED_ShowChar(x&#043;(size1\/2&#043;m)*t,y,temp&#043;&#039;0&#039;,size1,mode);<br \/>\n}<br \/>\n  }<br \/>\nOLED_Refresh();<br \/>\n}<\/p>\n<p>\/\/\u663e\u793a\u6c49\u5b57<br \/>\n\/\/x,y:\u8d77\u70b9\u5750\u6807<br \/>\n\/\/num:\u6c49\u5b57\u5bf9\u5e94\u7684\u5e8f\u53f7<br \/>\n\/\/mode:0,\u53cd\u8272\u663e\u793a;1,\u6b63\u5e38\u663e\u793a<br \/>\nvoid OLED_ShowChinese(u8 x,u8 y,u8 num,u8 size1,u8 mode)<br \/>\n{<br \/>\nu8 m,temp;<br \/>\nu8 x0&#061;x,y0&#061;y;<br \/>\nu16 i,size3&#061;(size1\/8&#043;((size1%8)?1:0))*size1;  \/\/\u5f97\u5230\u5b57\u4f53\u4e00\u4e2a\u5b57\u7b26\u5bf9\u5e94\u70b9\u9635\u96c6\u6240\u5360\u7684\u5b57\u8282\u6570<br \/>\nfor(i&#061;0;i&lt;size3;i&#043;&#043;)<br \/>\n{<br \/>\nif(size1&#061;&#061;16)<br \/>\n{temp&#061;Hzk1[num][i];}\/\/\u8c03\u752816*16\u5b57\u4f53<br \/>\nelse if(size1&#061;&#061;24)<br \/>\n{temp&#061;Hzk2[num][i];}\/\/\u8c03\u752824*24\u5b57\u4f53<br \/>\nelse if(size1&#061;&#061;32)<br \/>\n{temp&#061;Hzk3[num][i];}\/\/\u8c03\u752832*32\u5b57\u4f53<br \/>\nelse if(size1&#061;&#061;64)<br \/>\n{temp&#061;Hzk4[num][i];}\/\/\u8c03\u752864*64\u5b57\u4f53<br \/>\nelse return;<br \/>\nfor(m&#061;0;m&lt;8;m&#043;&#043;)<br \/>\n{<br \/>\nif(temp&amp;0x01)OLED_DrawPoint(x,y,mode);<br \/>\nelse OLED_DrawPoint(x,y,!mode);<br \/>\ntemp&gt;&gt;&#061;1;<br \/>\ny&#043;&#043;;<br \/>\n}<br \/>\nx&#043;&#043;;<br \/>\nif((x-x0)&#061;&#061;size1)<br \/>\n{x&#061;x0;y0&#061;y0&#043;8;}<br \/>\ny&#061;y0;<br \/>\n}<br \/>\nOLED_Refresh();<br \/>\n}<\/p>\n<p>\/\/num \u663e\u793a\u6c49\u5b57\u7684\u4e2a\u6570<br \/>\n\/\/space \u6bcf\u4e00\u904d\u663e\u793a\u7684\u95f4\u9694<br \/>\n\/\/mode:0,\u53cd\u8272\u663e\u793a;1,\u6b63\u5e38\u663e\u793a<br \/>\nvoid OLED_ScrollDisplay(u8 num,u8 space,u8 mode)<br \/>\n{<br \/>\nu8 i,n,t&#061;0,m&#061;0,r;<br \/>\nwhile(1)<br \/>\n{<br \/>\nif(m&#061;&#061;0)<br \/>\n{<br \/>\n    OLED_ShowChinese(128,24,t,16,mode); \/\/\u5199\u5165\u4e00\u4e2a\u6c49\u5b57\u4fdd\u5b58\u5728OLED_GRAM[][]\u6570\u7ec4\u4e2d<br \/>\nt&#043;&#043;;<br \/>\n}<br \/>\nif(t&#061;&#061;num)<br \/>\n{<br \/>\nfor(r&#061;0;r&lt;16*space;r&#043;&#043;)      \/\/\u663e\u793a\u95f4\u9694<br \/>\n {<br \/>\nfor(i&#061;1;i&lt;144;i&#043;&#043;)<br \/>\n{<br \/>\nfor(n&#061;0;n&lt;8;n&#043;&#043;)<br \/>\n{<br \/>\nOLED_GRAM[i-1][n]&#061;OLED_GRAM[i][n];<br \/>\n}<br \/>\n}<br \/>\n           OLED_Refresh();<br \/>\n }<br \/>\n        t&#061;0;<br \/>\n      }<br \/>\nm&#043;&#043;;<br \/>\nif(m&#061;&#061;16){m&#061;0;}<br \/>\nfor(i&#061;1;i&lt;144;i&#043;&#043;)   \/\/\u5b9e\u73b0\u5de6\u79fb<br \/>\n{<br \/>\nfor(n&#061;0;n&lt;8;n&#043;&#043;)<br \/>\n{<br \/>\nOLED_GRAM[i-1][n]&#061;OLED_GRAM[i][n];<br \/>\n}<br \/>\n}<br \/>\nOLED_Refresh();<br \/>\n}<br \/>\n}<\/p>\n<p>\/\/x,y&#xff1a;\u8d77\u70b9\u5750\u6807<br \/>\n\/\/sizex,sizey,\u56fe\u7247\u957f\u5bbd<br \/>\n\/\/BMP[]&#xff1a;\u8981\u5199\u5165\u7684\u56fe\u7247\u6570\u7ec4<br \/>\n\/\/mode:0,\u53cd\u8272\u663e\u793a;1,\u6b63\u5e38\u663e\u793a<br \/>\nvoid OLED_ShowPicture(u8 x,u8 y,u8 sizex,u8 sizey,u8 BMP[],u8 mode)<br \/>\n{<br \/>\nu16 j&#061;0;<br \/>\nu8 i,n,temp,m;<br \/>\nu8 x0&#061;x,y0&#061;y;<br \/>\nsizey&#061;sizey\/8&#043;((sizey%8)?1:0);<br \/>\nfor(n&#061;0;n&lt;sizey;n&#043;&#043;)<br \/>\n{<br \/>\n for(i&#061;0;i&lt;sizex;i&#043;&#043;)<br \/>\n {<br \/>\ntemp&#061;BMP[j];<br \/>\nj&#043;&#043;;<br \/>\nfor(m&#061;0;m&lt;8;m&#043;&#043;)<br \/>\n{<br \/>\nif(temp&amp;0x01)OLED_DrawPoint(x,y,mode);<br \/>\nelse OLED_DrawPoint(x,y,!mode);<br \/>\ntemp&gt;&gt;&#061;1;<br \/>\ny&#043;&#043;;<br \/>\n}<br \/>\nx&#043;&#043;;<br \/>\nif((x-x0)&#061;&#061;sizex)<br \/>\n{<br \/>\nx&#061;x0;<br \/>\ny0&#061;y0&#043;8;<br \/>\n}<br \/>\ny&#061;y0;<br \/>\n     }<br \/>\n }<br \/>\nOLED_Refresh();<br \/>\n}<br \/>\n\/\/OLED\u7684\u521d\u59cb\u5316<br \/>\nvoid OLED_Init(void)<br \/>\n{<br \/>\nGPIO_InitTypeDef  GPIO_InitStructure;<br \/>\n RCC_APB2PeriphClockCmd(OLED_SCL_GPIO_CLK|OLED_SDA_GPIO_CLK, ENABLE); \/\/\u4f7f\u80fdA\u7aef\u53e3\u65f6\u949f<br \/>\nGPIO_InitStructure.GPIO_Pin &#061; OLED_SCL_PIN;<br \/>\n GPIO_InitStructure.GPIO_Mode &#061; GPIO_Mode_Out_OD;  \/\/\u63a8\u633d\u8f93\u51fa<br \/>\nGPIO_InitStructure.GPIO_Speed &#061; GPIO_Speed_50MHz;\/\/\u901f\u5ea650MHz<br \/>\n GPIO_Init(OLED_SCL_PROT, &amp;GPIO_InitStructure);  \/\/\u521d\u59cb\u5316PA0,1<br \/>\n GPIO_SetBits(OLED_SCL_PROT,OLED_SCL_PIN);<\/p>\n<p>GPIO_InitStructure.GPIO_Pin &#061; OLED_SDA_PIN;<br \/>\nGPIO_Init(OLED_SDA_PROT, &amp;GPIO_InitStructure);  \/\/\u521d\u59cb\u5316PA0,1<br \/>\n GPIO_SetBits(OLED_SDA_PROT,OLED_SDA_PIN);<\/p>\n<p>delay_ms(200);<\/p>\n<p>OLED_WR_Byte(0xAE,OLED_CMD);\/\/&#8211;turn off oled panel \u5173\u95ed\u663e\u793a<br \/>\nOLED_WR_Byte(0x00,OLED_CMD);\/\/&#8212;set low column address<br \/>\nOLED_WR_Byte(0x10,OLED_CMD);\/\/&#8212;set high column address<br \/>\nOLED_WR_Byte(0x40,OLED_CMD);\/\/&#8211;set start line address  Set Mapping RAM Display Start Line (0x00~0x3F)<br \/>\nOLED_WR_Byte(0x81,OLED_CMD);\/\/&#8211;set contrast control register<br \/>\nOLED_WR_Byte(0xCF,OLED_CMD);\/\/ Set SEG Output Current Brightness<br \/>\nOLED_WR_Byte(0xA1,OLED_CMD);\/\/&#8211;Set SEG\/Column Mapping     0xa0\u5de6\u53f3\u53cd\u7f6e 0xa1\u6b63\u5e38<br \/>\nOLED_WR_Byte(0xC8,OLED_CMD);\/\/Set COM\/Row Scan Direction   0xc0\u4e0a\u4e0b\u53cd\u7f6e 0xc8\u6b63\u5e38<br \/>\nOLED_WR_Byte(0xA6,OLED_CMD);\/\/&#8211;set normal display<br \/>\nOLED_WR_Byte(0xA8,OLED_CMD);\/\/&#8211;set multiplex ratio(1 to 64) \u8bbe\u7f6e\u9a71\u52a8\u8def\u6570<br \/>\nOLED_WR_Byte(0x3f,OLED_CMD);\/\/&#8211;1\/64 duty<br \/>\nOLED_WR_Byte(0xD3,OLED_CMD);\/\/-set display offsetShift Mapping RAM Counter (0x00~0x3F)<br \/>\nOLED_WR_Byte(0x00,OLED_CMD);\/\/-not offset<br \/>\nOLED_WR_Byte(0xd5,OLED_CMD);\/\/&#8211;set display clock divide ratio\/oscillator frequency<br \/>\nOLED_WR_Byte(0x80,OLED_CMD);\/\/&#8211;set divide ratio, Set Clock as 100 Frames\/Sec<br \/>\nOLED_WR_Byte(0xD9,OLED_CMD);\/\/&#8211;set pre-charge period<br \/>\nOLED_WR_Byte(0xF1,OLED_CMD);\/\/Set Pre-Charge as 15 Clocks &amp; Discharge as 1 Clock<br \/>\nOLED_WR_Byte(0xDA,OLED_CMD);\/\/&#8211;set com pins hardware configuration<br \/>\nOLED_WR_Byte(0x12,OLED_CMD);<br \/>\nOLED_WR_Byte(0xDB,OLED_CMD);\/\/&#8211;set vcomh<br \/>\nOLED_WR_Byte(0x30,OLED_CMD);\/\/Set VCOM Deselect Level<br \/>\nOLED_WR_Byte(0x20,OLED_CMD);\/\/-Set Page Addressing Mode (0x00\/0x01\/0x02)<br \/>\nOLED_WR_Byte(0x02,OLED_CMD);\/\/<br \/>\nOLED_WR_Byte(0x8D,OLED_CMD);\/\/&#8211;set Charge Pump enable\/disable<br \/>\nOLED_WR_Byte(0x14,OLED_CMD);\/\/&#8211;set(0x10) disable<br \/>\nOLED_Clear();<br \/>\nOLED_WR_Byte(0xAF,OLED_CMD);<br \/>\n}<\/p>\n<h3 id=\"%E5%9B%9B%E3%80%81%E5%AE%9E%E9%AA%8C%E6%95%88%E6%9E%9C%C2%A0\">\u56db\u3001\u5b9e\u9a8c\u6548\u679c\u00a0<\/h3>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250611005455-6848d3df1a511.jpg\" \/><\/p>\n<h3 id=\"%E4%BA%94%E3%80%81%E8%B5%84%E6%96%99%E8%8E%B7%E5%8F%96\">\u4e94\u3001\u8d44\u6599\u83b7\u53d6<\/h3>\n<h4 id=\"%E9%A1%B9%E7%9B%AE%E5%88%86%E4%BA%AB\">\u9879\u76ee\u5206\u4eab<\/h4>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb4.2w\u6b21\uff0c\u70b9\u8d5e90\u6b21\uff0c\u6536\u85cf383\u6b21\u3002OLED\u662f\u6709\u673a\u53d1\u5149\u4e8c\u6781\u7ba1\uff0c\u53c8\u79f0\u4e3a\u6709\u673a\u7535\u6fc0\u5149\u663e\u793a\uff08OLEDOLED\u7531\u4e8e\u540c\u65f6\u5177\u5907\u81ea\u53d1\u5149\uff0c\u4e0d\u9700\u80cc\u5149\u6e90\u3001\u5bf9\u6bd4\u5ea6\u9ad8\u3001\u539a\u5ea6\u8584\u3001\u89c6\u89d2\u5e7f\u3001\u53cd\u5e94\u901f\u5ea6\u5feb\u3001\u53ef\u7528\u4e8e\u6320\u66f2\u6027\u9762\u677f\u3001\u4f7f\u7528\u6e29\u5ea6\u8303\u56f4\u5e7f\u3001\u6784\u9020\u53ca\u5236\u7a0b\u8f83\u7b80\u5355\u7b49\u4f18\u5f02\u4e4b\u7279\u6027\uff0c\u88ab\u8ba4\u4e3a\u662f\u4e0b\u4e00\u4ee3\u7684\u5e73\u9762\u663e\u793a\u5668\u65b0\u5174\u5e94\u7528\u6280\u672f\u4ee5\u4e0b\u662fOLED\u663e\u793a\u5c4f\u7684\u53c2\u6570\uff1a\u5c3a\u5bf80.96\u5bf8\u6a21\u5757\u7535\u538bDC\uff1a3~5V\u5206\u8fa8\u7387128\u00d764\u9a71\u52a8SSD1306\u7ba1\u811a\u65704\u9488\u63a5\u53e3IIC\u5de5\u4f5c\u6e29\u5ea6-20\u2103~70\u2103\u3002_0.96\u5bf8oled\u663e\u793a\u5c4f\u539f\u7406\u56fe<\/p>\n","protected":false},"author":2,"featured_media":43088,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[217,3993,270,269],"topic":[],"class_list":{"0":"post-43093","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","6":"hentry","7":"category-server","8":"tag-stm32","10":"tag-270","11":"tag-269"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>OLED\u663e\u793a\u5c4f\u8be6\u89e3(IIC\u534f\u8bae0.96\u5bf8 STM32\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/43093.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"OLED\u663e\u793a\u5c4f\u8be6\u89e3(IIC\u534f\u8bae0.96\u5bf8 STM32\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb4.2w\u6b21\uff0c\u70b9\u8d5e90\u6b21\uff0c\u6536\u85cf383\u6b21\u3002OLED\u662f\u6709\u673a\u53d1\u5149\u4e8c\u6781\u7ba1\uff0c\u53c8\u79f0\u4e3a\u6709\u673a\u7535\u6fc0\u5149\u663e\u793a\uff08OLEDOLED\u7531\u4e8e\u540c\u65f6\u5177\u5907\u81ea\u53d1\u5149\uff0c\u4e0d\u9700\u80cc\u5149\u6e90\u3001\u5bf9\u6bd4\u5ea6\u9ad8\u3001\u539a\u5ea6\u8584\u3001\u89c6\u89d2\u5e7f\u3001\u53cd\u5e94\u901f\u5ea6\u5feb\u3001\u53ef\u7528\u4e8e\u6320\u66f2\u6027\u9762\u677f\u3001\u4f7f\u7528\u6e29\u5ea6\u8303\u56f4\u5e7f\u3001\u6784\u9020\u53ca\u5236\u7a0b\u8f83\u7b80\u5355\u7b49\u4f18\u5f02\u4e4b\u7279\u6027\uff0c\u88ab\u8ba4\u4e3a\u662f\u4e0b\u4e00\u4ee3\u7684\u5e73\u9762\u663e\u793a\u5668\u65b0\u5174\u5e94\u7528\u6280\u672f\u4ee5\u4e0b\u662fOLED\u663e\u793a\u5c4f\u7684\u53c2\u6570\uff1a\u5c3a\u5bf80.96\u5bf8\u6a21\u5757\u7535\u538bDC\uff1a3~5V\u5206\u8fa8\u7387128\u00d764\u9a71\u52a8SSD1306\u7ba1\u811a\u65704\u9488\u63a5\u53e3IIC\u5de5\u4f5c\u6e29\u5ea6-20\u2103~70\u2103\u3002_0.96\u5bf8oled\u663e\u793a\u5c4f\u539f\u7406\u56fe\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/43093.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-06-11T00:54:56+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250611005451-6848d3db36d3b.jpg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/43093.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/43093.html\",\"name\":\"OLED\u663e\u793a\u5c4f\u8be6\u89e3(IIC\u534f\u8bae0.96\u5bf8 STM32\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-06-11T00:54:56+00:00\",\"dateModified\":\"2025-06-11T00:54:56+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/43093.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/43093.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/43093.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"OLED\u663e\u793a\u5c4f\u8be6\u89e3(IIC\u534f\u8bae0.96\u5bf8 STM32\uff09\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"OLED\u663e\u793a\u5c4f\u8be6\u89e3(IIC\u534f\u8bae0.96\u5bf8 STM32\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/43093.html","og_locale":"zh_CN","og_type":"article","og_title":"OLED\u663e\u793a\u5c4f\u8be6\u89e3(IIC\u534f\u8bae0.96\u5bf8 STM32\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb4.2w\u6b21\uff0c\u70b9\u8d5e90\u6b21\uff0c\u6536\u85cf383\u6b21\u3002OLED\u662f\u6709\u673a\u53d1\u5149\u4e8c\u6781\u7ba1\uff0c\u53c8\u79f0\u4e3a\u6709\u673a\u7535\u6fc0\u5149\u663e\u793a\uff08OLEDOLED\u7531\u4e8e\u540c\u65f6\u5177\u5907\u81ea\u53d1\u5149\uff0c\u4e0d\u9700\u80cc\u5149\u6e90\u3001\u5bf9\u6bd4\u5ea6\u9ad8\u3001\u539a\u5ea6\u8584\u3001\u89c6\u89d2\u5e7f\u3001\u53cd\u5e94\u901f\u5ea6\u5feb\u3001\u53ef\u7528\u4e8e\u6320\u66f2\u6027\u9762\u677f\u3001\u4f7f\u7528\u6e29\u5ea6\u8303\u56f4\u5e7f\u3001\u6784\u9020\u53ca\u5236\u7a0b\u8f83\u7b80\u5355\u7b49\u4f18\u5f02\u4e4b\u7279\u6027\uff0c\u88ab\u8ba4\u4e3a\u662f\u4e0b\u4e00\u4ee3\u7684\u5e73\u9762\u663e\u793a\u5668\u65b0\u5174\u5e94\u7528\u6280\u672f\u4ee5\u4e0b\u662fOLED\u663e\u793a\u5c4f\u7684\u53c2\u6570\uff1a\u5c3a\u5bf80.96\u5bf8\u6a21\u5757\u7535\u538bDC\uff1a3~5V\u5206\u8fa8\u7387128\u00d764\u9a71\u52a8SSD1306\u7ba1\u811a\u65704\u9488\u63a5\u53e3IIC\u5de5\u4f5c\u6e29\u5ea6-20\u2103~70\u2103\u3002_0.96\u5bf8oled\u663e\u793a\u5c4f\u539f\u7406\u56fe","og_url":"https:\/\/www.wsisp.com\/helps\/43093.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-06-11T00:54:56+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/06\/20250611005451-6848d3db36d3b.jpg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"11 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/43093.html","url":"https:\/\/www.wsisp.com\/helps\/43093.html","name":"OLED\u663e\u793a\u5c4f\u8be6\u89e3(IIC\u534f\u8bae0.96\u5bf8 STM32\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-06-11T00:54:56+00:00","dateModified":"2025-06-11T00:54:56+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/43093.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/43093.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/43093.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"OLED\u663e\u793a\u5c4f\u8be6\u89e3(IIC\u534f\u8bae0.96\u5bf8 STM32\uff09"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/43093","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=43093"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/43093\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/43088"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=43093"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=43093"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=43093"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=43093"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}