Home>Article>Development Tools> How to use Notepad++ instead of Arduino IDE? (Detailed explanation with pictures and text)

How to use Notepad++ instead of Arduino IDE? (Detailed explanation with pictures and text)

不言
不言 Original
2018-09-26 17:31:55 6994browse

The content of this article is about how to use Notepad instead of Arduino IDE? (Detailed explanation with pictures and text), has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.

The origin of the problem

The IDE that comes with Arduino is too difficult to use, the indentation is ugly, there is no prompt function, the support for Chinese is not good, and it is all difficult to use::> ;_db431353bf641e8ed2b72dfc4be20164[Customize language Format], click [Import] in the pop-up dialog box, select the

Arduino_language_0.2.0.xmlfile in the Notepad .Arduino.0.2.0 plug-in package extracted above, and import Just close the dialog box when finished.

4. Copy the two files under APIs in the plug-in package to the APIs under plugins under Notepad

5. Open Notepad, menu bar [Plug-in]->[Plugin Manager]->[Show Plugin Manager], find

NppExec, and install it.

6. Open Notepad, go to [Language]-> in the menu bar and find [Arduino] at the bottom, select it. Start writing a simple arduino code (code prompts can be implemented currently, but there will be more powerful ones later).

7. Edit 2 execution scripts

After the above code is written, press F6 to execute the code, and the following dialog box will pop up

## Select

temporary scriptat #1 to create a new script. Enter the following script at2

NPP_SAVE"H:\Arduino\arduino-1.6.8-windows\arduino-1.6.8\arduino_debug.exe" --verify "$(FULL_CURRENT_PATH)"

Explain:The format of the second line is as follows:
The path of arduino_debug.exe in your arduino installation directory [space] --verify [space]
"$(FULL_CURRENT_PATH)"

3 Save at 3, enter the name of the saved script: Arduino_verify, click OK.

The above script is used to verify and compile the Arduino program. In the same method, we need to create a new script to download the program to the board.

Script content:

NPP_SAVE"H:\Arduino\arduino-1.6.8-windows\arduino-1.6.8\arduino_debug.exe" --upload "$(FULL_CURRENT_PATH)"

The name is saved as: Arduino_upload.

In this way we have 2 scripts, one for compiling and downloading the Arduino program.

Verify whether the previous work is correct: after writing the code, press F6, the dialog box that pops up will let us choose the script to execute, first select Arduino_verify, click OK, compile, this time The compilation information will appear in the Notepad console. Press F6 again, select Arduino_upload, click OK, and upload. The upload information will also be displayed in the Notepad console.

Process started >>> Looking for library 'user32' Adding paths from jna.library.path: null Trying user32.dll Found library 'user32' at user32.dll DPI detection failed, fallback to 96 dpi Looking for library 'shell32' Adding paths from jna.library.path: null Trying shell32.dll Found library 'shell32' at shell32.dll Looking for library 'Ole32' Adding paths from jna.library.path: null Trying Ole32.dll Found library 'Ole32' at Ole32.dll 正在加载配置... 正在初始化包... 正在准备开发板... 正在验证...

Add smart input function

The main effect is that if you enter the abbreviation and press the tab key, Notepad will automatically set the complete code. If you enter dw and press the tab key, it will be completed as digitalWrite.

You also need to install a plug-in:

[Plug-in]->[Plugin Manager]->[Show Plugin Manager], find

FingerText,Install.

After the installation is complete, click:

[Plug-in]->[FingerText]->[Toggle on/off SnippetDock], the following will be displayed on the right side of the editing area:

点击上面的【Create snippet From Selection】,出现如下页面。

对于每一条缩略字补全规则,我们需要填写 红色箭头 所指的3个区域。

第一:缩略词。根据你自己的喜好,建立缩略词与完整代码的映射关系,如dw --> digitalWrite()

第二:这个规则生效的环境。可以是 GLOBAL, Lang:xxx, Ext.xxx

  • GLOBAL 表示对于所有语言,所有后缀格式的文件,都生效。

  • Lang:HTML 表示对HTML语言生效,Lang:java表示对java语言生效。

  • Ext:ino 表示对文件后缀后ino 的文件生效(Arduino主sketch的后缀就是ino) 。Ext:cpp对cpp后缀生效。

第三:缩略词对应的完整代码。

在完整代码中可以使用 $[![]!] 来定位热点光标。补全后,使用tab键可以依次按序定位到热点。还可以使用带名称的热点,名称填写可选的值。

如: $[![pin]!] $[![OUTPUT]!] ,补全后,按下tab,就可以定位到带名字的热点pin,再按下,就会定位到下一个带名字的热点OUTPUT。

每条完整代码后面都要使用 [>END9fdb6dc498b9d19e754eb0fccfb40dbf【Plugin Manager】- >【Show Plugin Manager】,找到Explorer,安装。点击红心旁边的按钮就可以打开。

使用第三方串口监视器软件

openjumper的串口监视器软件。这个是我目前找到的能够兼容Arduino的串口监视软件,它是专门为Arduino写的,但是里面有广告。

链接:http://pan.baidu.com/s/1ge7fRHL 密码:wdks

也可以到官网下载。

最后的提示

1、Arduino在执行编译和上传脚本时,会加载当前开发板的相关配置信息。这个配置文件在【Arduino IED】 ->【文件】->【首选项】面板的最下面的一个文件路径,点击后里面有个preference.txt,这个就是编译和上传时的配置文件。

在Arduino IDE中我们可以在选项卡里面配置,但是Notepad++则没有这个功能,如果你的开发配置改变了(换了不同型号Ardunio板,或则端口等),则需要打开Arduino IDE,进行配置,配置好以后,关闭Arduino IDE,对应的配置就保存到preference.txt中去了,这个时候Notepad++就能加载正确的配置,就可以使用Notepad++编译和上传了。

2、在使用Arduino IDE 建立工程时,要遵守以下规范:主sketch所在的文件夹名要和主sketch名一致!假如编写一个 LED 的闪烁程序。

/workspace //arduino的工作目录 /blink //当前工程的目录 blink.ino //arduino源文件,和当前工程目录名称一样。

The above is the detailed content of How to use Notepad++ instead of Arduino IDE? (Detailed explanation with pictures and text). For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn