0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Arduino IDEとPlatformIO IDE

Last updated at Posted at 2023-06-12

sketch(Arduino IDE)やPlatformIO IDEの統合開発環境について知らずに触っていたので、調べてみることにしました。

1.統合開発環境(IDE:Integrated Development Environment)

統合開発環境は、テキストエディタ、コンパイラ、リンカ、デバッカーなど開発に必要な機能を一つにまとめたソフトウエアです。開発環境がまとめられていることで、対象のデバイスに書き込むプログラム、コンパイラの状態を残すことができます。そうすることで、開発環境を再構築しやすくなり、開発環境構築にかかる時間を省くことができます。

2.Arduino IDEと PlatformIO IDE

マイコンをコンパイルする際に使用するIDEには、Arduino IDEと PlatformIO IDEがあります。platformioのサイトからの引用ですが、どちらを使用するかは、プロジェクトやユーザーによって変ってきます。Arduino IDEは、初心者やシンプルなプロジェクトを進めていくのに適していて、 PlatformIOは、高機能な開発環境をつくることができ、より高度で複雑なプロジェクトを進めていくことに適しています。

Arduino IDE is a simple and easy-to-use development environment that is specifically designed for the Arduino platform. It provides a straightforward and intuitive interface for writing and uploading code to the board. The Arduino IDE is well-suited for simple projects and for users who are new to the world of microcontrollers.

PlatformIO IDE, on the other hand, is a more powerful and feature-rich development environment. It supports a wider range of microcontroller platforms and development boards, and provides a comprehensive set of tools for Library Management, Continuous Integration, Unit Testing, and Debugging. PlatformIO IDE is well-suited for more complex projects and for experienced users who need more advanced features.

3. Arduino IDEの開発環境

スクリーンショット 2023-06-13 8.07.38.png

Arduino IDEで行っていることをブロック図にしてみました。ボードマネージャーでは、特定の製品群をまとめているパッケージを最初に登録します。パッケージの中には、製品群からさらに詳細に分かれた製品に対して特化したプログラムが記述されています。製品ごとにボード内に使用されているマイコンが変わるのでそれに合わせたプログラムが関数としてまとまっているものがライブラリになります。そのライブラリを実行させるコードで使用するには、includeでライブラリを読み込むことで関数を使用できることになります。コードが完成し、書き込みたいマイコンを選択するのにボードの設定をしてコンパイルと書き込みをします。プログラム内でデバックとしてシリアルアウトしておけば、実行されたときの結果がシリアルモニタを介して確認することができます。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?