「ホタログ4」の編集履歴(バックアップ)一覧はこちら

ホタログ4」(2007/07/22 (日) 17:40:52) の最新版変更点

追加された行は緑色になります。

削除された行は赤色になります。

**2007.7.21 -&bold(){今日までの成果} ホタル通信をコンパクトに改造。 #image(070721_1911-01.jpg) 図7.21 これでプログラム確認がより簡単に。 見た目はタッパーウェアと、格好悪くはなったけれど。 >&bold(){コメント} #comment(vsize=2,nsize=20,size=40) ---- **2007.7.17 -&bold(){今日までの成果} プログラム解読中。 まとまった時間が欲しい!! -あとは 演劇のポスター作ってました。正直しんどい。 今日はいっぺんにいろんなことが片付いた(ように見える)ので、 心の余裕が多少膨らんだような予感。 次回公演の上演許可・・・相手がフランス人なので、もしフランス語で送れとかなったらどうしよう。 >&bold(){コメント} #comment(vsize=2,nsize=20,size=40) ---- **2007.7.16 -&bold(){今日までの成果} あれー・・・変なことに。 行ごとにやっぱり時間がかかっているのかー。 -Arduino Forum で見つけた、TCNTを使った(を確認する?)プログラム -昨日のプログラムの一部行を入れ替えてみたVer. -[[http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1180984367/11>http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1180984367/11]] #highlight(c){{ int ledPin = 13; int t1,t2,diff; void setup() { pinMode(ledPin, OUTPUT); digitalWrite(ledPin, HIGH); Serial.begin(9600); } void loop() { t1 = TCNT0; // delayMicroseconds(100); // t2 = TCNT0; Serial.print("TCNT 1: "); Serial.println(t1,DEC); // print the value to the serial port delayMicroseconds(100); t2 = TCNT0; Serial.print("TCNT 2: "); Serial.println(t2,DEC); // print the value to the serial port diff = t2 - t1; Serial.print("Diff: "); Serial.println(diff,DEC); // print the value to the serial port delay(900); // stop the program for some time } }} -これの結果(Serial Monitor) #highlight(c){ TCNT 1: 25 TCNT 2: 91 Diff: 66 TCNT 1: 21 TCNT 2: 89 Diff: 68 TCNT 1: 14 TCNT 2: 81 Diff: 67 TCNT 1: 19 TCNT 2: 85 Diff: 66 TCNT 1: 15 TCNT 2: 81 Diff: 66 TCNT 1: 21 TCNT 2: 88 Diff: 67 TCNT 1: 19 TCNT 2: 86 Diff: 67 TCNT 1: 15 TCNT 2: 83 Diff: 68 TCNT 1: 13 TCNT 2: 80 Diff: 67 TCNT 1: 20 TCNT 2: 87 Diff: 67 TCNT 1: 15 TCNT 2: 82 Diff: 67 TCNT 1: 20 TCNT 2: 87 Diff: 67 TCNT 1: 20 TCNT 2: 86 Diff: 66 TCNT 1: 12 TCNT 2: 79 Diff: 67 TCNT 1: 17 TCNT 2: 84 Diff: 67 TCNT 1: 16 TCNT 2: 83 Diff: 67  :  : } -もうすこし頭いいとすぐ終わりそうなところな気がするんだけど・・・。 -&bold(){delayMicroseconds()に関する発見} Referenceに以下の記述を発見。 -&bold(){Warning} >This function works very accurately in the range 3 microseconds and up. We cannot assure that delayMicroseconds will perform precisely for smaller delay-times. To ensure more accurate delays, this functions disables interrupts during its operation, meaning that some things (like receiving serial data, or incrementing the value returned by millis()) will not happen during the delay. Thus, you should only use this function for short delays, and use delay() for longer ones. -&bold(){警告} この機能は3マイクロセカンド以上の正確さで働いている。delayMicrosecondsの働きに、より小さい遅れがあるかもしれないことを保証できない。 より正確な遅れを確実にするために、これが操作中、割り込みを無効にする。それ(シリアルデータの返りや、またはMillis()の返り値の増加など)がdelayの間に起こらないだろうことを意味しながら。したがって、あなたは、少し遅らせるときにこの機能を使うべきである。より長いものにdelay()を使うべき。 時間コントロールは、むずかしい。 >&bold(){コメント} #comment(vsize=2,nsize=20,size=40) ---- ---- today: &counter(today) yesterday: &counter(yesterday)
**2007.7.21 -&bold(){今日までの成果} ホタル通信をコンパクトに改造。 #image(070721_1911-01.jpg) 図7.21 これでプログラム確認がより簡単に。 見た目はタッパーウェアと、格好悪くはなったけれど。 >&bold(){コメント} #comment(vsize=2,nsize=20,size=40) ---- **2007.7.17 -&bold(){今日までの成果} プログラム解読中。 まとまった時間が欲しい!! -あとは 演劇のポスター作ってました。正直しんどい。 今日はいっぺんにいろんなことが片付いた(ように見える)ので、 心の余裕が多少膨らんだような予感。 次回公演の上演許可・・・相手がフランス人なので、もしフランス語で送れとかなったらどうしよう。 >&bold(){コメント} #comment(vsize=2,nsize=20,size=40) ---- **2007.7.16 -&bold(){今日までの成果} あれー・・・変なことに。 行ごとにやっぱり時間がかかっているのかー。 -Arduino Forum で見つけた、TCNTを使った(を確認する?)プログラム -昨日のプログラムの一部行を入れ替えてみたVer. -[[http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1180984367/11>http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1180984367/11]] #highlight(c){{ int ledPin = 13; int t1,t2,diff; void setup() { pinMode(ledPin, OUTPUT); digitalWrite(ledPin, HIGH); Serial.begin(9600); } void loop() { t1 = TCNT0; // delayMicroseconds(100); // t2 = TCNT0; Serial.print("TCNT 1: "); Serial.println(t1,DEC); // print the value to the serial port delayMicroseconds(100); t2 = TCNT0; Serial.print("TCNT 2: "); Serial.println(t2,DEC); // print the value to the serial port diff = t2 - t1; Serial.print("Diff: "); Serial.println(diff,DEC); // print the value to the serial port delay(900); // stop the program for some time } }} -これの結果(Serial Monitor) #highlight(c){ TCNT 1: 25 TCNT 2: 91 Diff: 66 TCNT 1: 21 TCNT 2: 89 Diff: 68 TCNT 1: 14 TCNT 2: 81 Diff: 67 TCNT 1: 19 TCNT 2: 85 Diff: 66 TCNT 1: 15 TCNT 2: 81 Diff: 66 TCNT 1: 21 TCNT 2: 88 Diff: 67 TCNT 1: 19 TCNT 2: 86 Diff: 67 TCNT 1: 15 TCNT 2: 83 Diff: 68 TCNT 1: 13 TCNT 2: 80 Diff: 67 TCNT 1: 20 TCNT 2: 87 Diff: 67 TCNT 1: 15 TCNT 2: 82 Diff: 67 TCNT 1: 20 TCNT 2: 87 Diff: 67 TCNT 1: 20 TCNT 2: 86 Diff: 66 TCNT 1: 12 TCNT 2: 79 Diff: 67 TCNT 1: 17 TCNT 2: 84 Diff: 67 TCNT 1: 16 TCNT 2: 83 Diff: 67  :  : } -もうすこし頭いいとすぐ終わりそうなところな気がするんだけど・・・。 -&bold(){delayMicroseconds()に関する発見} Referenceに以下の記述を発見。 >-&bold(){Warning} >This function works very accurately in the range 3 microseconds and up. We cannot assure that delayMicroseconds will perform precisely for smaller delay-times. > >To ensure more accurate delays, this functions disables interrupts during its operation, meaning that some things (like receiving serial data, or incrementing the value returned by millis()) will not happen during the delay. Thus, you should only use this function for short delays, and use delay() for longer ones. >-&bold(){警告} >この機能は3マイクロセカンド以上の正確さで働いている。delayMicrosecondsの働きに、より小さい遅れがあるかもしれないことを保証できない。 > >より正確な遅れを確実にするために、これが操作中、割り込みを無効にする。それ(シリアルデータの返りや、またはMillis()の返り値の増加など)がdelayの間に起こらないだろうことを意味しながら。したがって、あなたは、少し遅らせるときにこの機能を使うべきである。より長いものにdelay()を使うべき。 時間コントロールは、むずかしい。 >&bold(){コメント} #comment(vsize=2,nsize=20,size=40) ---- ---- today: &counter(today) yesterday: &counter(yesterday)

表示オプション

横に並べて表示:
変化行の前後のみ表示: