Part6_进阶使用指令操作
<p>[TOC]</p>
<h1>功能描述</h1>
<p>本例将演示arduino系统发送指令,操控ATF显示模块。</p>
<h4>接线方法</h4>
<ol>
<li>将彩屏和Arduino控制器进行连接,RX-TX,GND-GND(用到了RX和TX串口)</li>
</ol>
<h4>实现功能</h4>
<p>当程序启动后,arduino会发送指令,ATF显示模块将根据指令做出相应显示,本例程将通过背光设置和清除打印区域两种指令做演示。</p>
<h4>串口直接打印模式</h4>
<p>我们在【界面指令】中添加,用于打印显示步骤,如下图:
<img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=a7c90f7db47dfaf596d06eeea4aac4f5&amp;file=file.png" alt="" /></p>
<h1>使用代码</h1>
<pre><code class="language-c">void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
delay(3000);
}
unsigned char m_RunFlag=0;
void loop() {
// put your main code here, to run repeatedly:
if(m_RunFlag==1) return;
m_RunFlag = 1;
Serial.println(&quot;ATF Module Display Command Test&quot;);
Serial.println(&quot;Set backlight to 50...&quot;);
delay(2000);
Serial.print(&quot;@BKL 50\r&quot;);
delay(2000);
Serial.println(&quot;Set backlight to 300...&quot;);
delay(2000);
Serial.println(&quot;@BKL 300&quot;);
delay(2000);
Serial.println(&quot;Clean PrintMode Area...&quot;);
delay(2000);
Serial.println(&quot;@PRCLR&quot;);
}</code></pre>
<h1>视频教程</h1>
<p><a href="https://www.bilibili.com/video/BV1EL411A72F/?spm_id_from=333.999.0.0&amp;vd_source=8adc070117854dc6967b17bf3379321b">【初级篇】Part6_进阶使用指令操作</a>- </p>