[ ST NUCLEO-U575ZI-Q 测评] arduino OLED显示
<div class='showpostmsg'><p># 新建项目:</p><p>Create New Project:</p>
<p>稍等一会完成。</p>
<p>在Libraries里面查找库:</p>
<p> 找到ssd1306的这个库 点击Add to project,等一会就下载好了。</p>
<p> 书写主程序如下:</p>
<pre>
<code>#include <Arduino.h>
#include <Wire.h>
#include <SPI.h>
#include "ssd1306.h"
#include "ssd1306_console.h"
void setup()
{
/* Replace the line below with the display initialization function, you want to use */
ssd1306_128x64_i2c_init();
ssd1306_clearScreen();
/* Set font to use with console */
ssd1306_setFixedFont(ssd1306xled_font6x8);
}
void loop()
{
ssd1306_print( "This is console output: " );
ssd1306_print( "go to the next line\n" );
delay(500);
}</code></pre>
<p>编译后下载到开发板。</p>
<p>连接OLED,接线图如下:</p>
<p>OLED 开发板</p>
<p>SCL------- D15</p>
<p>SDA------- D14</p>
<p>GND------GND</p>
<p>VCC------3.3V</p>
<p>运行后如图 </p>
<p> </p>
<p> f30bab2b9fda13b3cbba3bacbb546767<br />
相机太差了,怕不好。。。</p>
</div><script> var loginstr = '<div class="locked">查看本帖全部内容,请<a href="javascript:;" style="color:#e60000" class="loginf">登录</a>或者<a href="https://bbs.eeworld.com.cn/member.php?mod=register_eeworld.php&action=wechat" style="color:#e60000" target="_blank">注册</a></div>';
if(parseInt(discuz_uid)==0){
(function($){
var postHeight = getTextHeight(400);
$(".showpostmsg").html($(".showpostmsg").html());
$(".showpostmsg").after(loginstr);
$(".showpostmsg").css({height:postHeight,overflow:"hidden"});
})(jQuery);
} </script><script type="text/javascript">(function(d,c){var a=d.createElement("script"),m=d.getElementsByTagName("script"),eewurl="//counter.eeworld.com.cn/pv/count/";a.src=eewurl+c;m.parentNode.insertBefore(a,m)})(document,523)</script> <p>测评汇总:免费申请|ST NUCLEO-U575ZI-Q https://bbs.eeworld.com.cn/thread-1228653-1-1.html</p>
页:
[1]