Once the LED is connected, you need to tell Arduino what to do.


This is done through code: a list of instructions that you give the micro controller to make it do what you want.


(The words code,program, and sketch are all terms that refer to this same list ofinstructions.)


On your computer, run the Arduino IDE (on the Mac, it should be in the Applications folder; on Windows,the shortcut will be either on your desktop or in the Start menu).

コンピュータでArduino IDEを起動します(Macの場合はアプリケーションフォルダ内に、Windowsの場合はデスクトップ又はスタートメニュー内にショートカットがあります。)

Select File→New and you’ll be asked to choose a sketch folder name: this is where your Arduino sketch will be stored.


Name it Blinking_LED and click OK.


Then, type the following sketch (Example 4-1) into the Arduino sketch editor (the main window of the Arduino IDE).

次に、以下のスケッチを(Example 4-1)をArduinoスケッチエディタ(Arduino IDEのメイン・ウィンドウ)に入力します。

You can also download it from the example code link on the book’s catalog page.


You can also load this sketch simply by clicking File→Examples→01.Basics→Blink, but you’ll learn better if you type it in yourself.


It should appear as shown in Figure 4-2.


トップ   編集 凍結解除 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2021-10-13 (水) 14:42:08