#author("2021-12-07T10:20:27+09:00","","")
[[FrontPage]]

Coding
 コーディング
There are two sketches that you’ll be running: the Processing sketch and the Arduino sketch. 
 実行するスケッチは、ProcessingスケッチとArduinoスケッチの2つです。
Example 7-1 is the code for the Processing sketch. 
 例 7-1 は Processing スケッチのコードです。
You can also download it from the example code link on the book’s catalog page.
 また、書籍のカタログページにあるサンプルコードのリンクからもダウンロードできます。
Example 7-1.Arduino Networked Lamp 
 例7-1.Arduinoネットワーク対応ランプ 
Parts of the code are inspired by a blog post by Tod E. Kurt (http://todbot.com).
 コードの一部は、Tod E. Kurt氏のブログ記事(http://todbot.com)を参考にしています
There is one thing you need to do before the Processing sketch will run correctly: you need to confirm that the sketch is using the correct serial port for talking to Arduino. 
 Processingスケッチが正しく実行される前に、1つやるべきことがあります。スケッチがArduinoとの通信に正しいシリアルポートを使用していることを確認する必要があります。
You’ll need to wait until you’ve assembled the Arduino circuit and uploaded the Arduino sketch before you can confirm this. 
 これを確認するには、Arduinoの回路を組み立て、Arduinoのスケッチをアップロードするまで待つ必要があります。
On some systems, this Processing sketch will run fine. 
 一部のシステムでは、このProcessing sketchは問題なく動作します。
However, if you don’t see anything happening on the Arduino and you don’t see any information from the light sensor appearing onscreen, find the comment labeled IMPORTANT NOTE in the Processing sketch and follow the instructions there.
 しかし、Arduino上で何も起こらず、光センサーからの情報が画面に表示されない場合は、Processingスケッチの中の「IMPORTANT NOTE」と書かれたコメントを見つけ、そこに書かれた指示に従ってください。


トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS