• <legend id='3pHUG'><style id='3pHUG'><dir id='3pHUG'><q id='3pHUG'></q></dir></style></legend>

    <small id='3pHUG'></small><noframes id='3pHUG'>

      <tfoot id='3pHUG'></tfoot>

      1. <i id='3pHUG'><tr id='3pHUG'><dt id='3pHUG'><q id='3pHUG'><span id='3pHUG'><b id='3pHUG'><form id='3pHUG'><ins id='3pHUG'></ins><ul id='3pHUG'></ul><sub id='3pHUG'></sub></form><legend id='3pHUG'></legend><bdo id='3pHUG'><pre id='3pHUG'><center id='3pHUG'></center></pre></bdo></b><th id='3pHUG'></th></span></q></dt></tr></i><div id='3pHUG'><tfoot id='3pHUG'></tfoot><dl id='3pHUG'><fieldset id='3pHUG'></fieldset></dl></div>
        • <bdo id='3pHUG'></bdo><ul id='3pHUG'></ul>

      2. 发送“ENTER"通过串口键

        时间:2023-08-27
          <tfoot id='gK0CO'></tfoot>
            <bdo id='gK0CO'></bdo><ul id='gK0CO'></ul>
              <legend id='gK0CO'><style id='gK0CO'><dir id='gK0CO'><q id='gK0CO'></q></dir></style></legend>

              <small id='gK0CO'></small><noframes id='gK0CO'>

                <tbody id='gK0CO'></tbody>

              <i id='gK0CO'><tr id='gK0CO'><dt id='gK0CO'><q id='gK0CO'><span id='gK0CO'><b id='gK0CO'><form id='gK0CO'><ins id='gK0CO'></ins><ul id='gK0CO'></ul><sub id='gK0CO'></sub></form><legend id='gK0CO'></legend><bdo id='gK0CO'><pre id='gK0CO'><center id='gK0CO'></center></pre></bdo></b><th id='gK0CO'></th></span></q></dt></tr></i><div id='gK0CO'><tfoot id='gK0CO'></tfoot><dl id='gK0CO'><fieldset id='gK0CO'></fieldset></dl></div>

                  本文介绍了发送“ENTER"通过串口键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  您好,我想向通过串口连接的设备发送一些命令.怎么寄?

                  Hi I want to send some command to my device which is connected via serial port. How to send it?

                  例如,我在谷歌搜索中找到了这个,但对我来说没用.

                  For example i found this on google search but for me it's useless.

                  Control + E 是 5 的键盘快捷键,所以:

                  Control + E is a keyboard shortcut for 5, so:

                  serial.Write(new byte[]{ 5 }, 0, 1);
                  

                  推荐答案

                  微软版的回车或换行是 ,即0x0d 0x0a hex.

                  The microsoft version of enter or new line is which is 0x0d 0x0a in hex.

                  • 是回车

                  在外壳或打印机中,这会将光标放回行首.

                  In a shell or a printer this would put the cursor back to the beginning of the line.

                  是换行符

                  将光标放在一个下面的行,在某些 shell 中,这也会将光标放在下一行的开头.打印机只需稍微滚动一下纸张即可.

                  Puts the cursor one line below, in some shells this also puts the cursor to the beginning of the next line. a printer would simply scroll the paper a bit.

                  历史课就讲这么多.当前的 Windows 系统仍然使用这些字符来表示行结束.当按下 enter 时,Dos 会生成此代码.

                  So much for the history lesson. Current windows systems still use these characters to indicate a line ending. Dos generated this code when pressing enter.

                  键码有点不同.从 esc 键开始是 1.Enter 是 28.

                  The key code is a bit different. Beginning with the esc key being the 1. Enter is 28.

                  来源:来自 www.comptechdoc.org 的 linux hlkeycodes

                  这篇关于发送“ENTER"通过串口键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:C# 控制台应用程序无效操作异常 下一篇:在窗口化应用程序中写入命令行

                  相关文章

                  最新文章

                    <legend id='hgGYK'><style id='hgGYK'><dir id='hgGYK'><q id='hgGYK'></q></dir></style></legend>
                    <i id='hgGYK'><tr id='hgGYK'><dt id='hgGYK'><q id='hgGYK'><span id='hgGYK'><b id='hgGYK'><form id='hgGYK'><ins id='hgGYK'></ins><ul id='hgGYK'></ul><sub id='hgGYK'></sub></form><legend id='hgGYK'></legend><bdo id='hgGYK'><pre id='hgGYK'><center id='hgGYK'></center></pre></bdo></b><th id='hgGYK'></th></span></q></dt></tr></i><div id='hgGYK'><tfoot id='hgGYK'></tfoot><dl id='hgGYK'><fieldset id='hgGYK'></fieldset></dl></div>

                    <small id='hgGYK'></small><noframes id='hgGYK'>

                    <tfoot id='hgGYK'></tfoot>
                        <bdo id='hgGYK'></bdo><ul id='hgGYK'></ul>