Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Revision 4:09965b74dfaf, committed 2015-08-23
- Comitter:
- hagi_hara
- Date:
- Sun Aug 23 04:28:15 2015 +0000
- Parent:
- 3:b2fc5d582f69
- Commit message:
- fix:????????; fix:printf??????????????????????
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Sat Aug 22 10:16:23 2015 +0000 +++ b/main.cpp Sun Aug 23 04:28:15 2015 +0000 @@ -34,7 +34,7 @@ int main() { - pc.printf("Hello World!\n\r"); + pc.printf("Hello World!\r\n"); while(true) { //入力:センサーなどから入力値を読み取る analogInValue = analogInModule; @@ -42,7 +42,7 @@ //analogValue小さい時はスピーカーをオフにする。 if(analogInValue < 0.05f) { speaker.write(SP_OFF); - //pc.printf("OFF\n\r"); + pc.printf("OFF\n\r"); } else { //処理: tunedValue = tuning(analogInValue); //tuning関数で入力値を調整 @@ -51,7 +51,7 @@ speaker.period(interval); speaker.write(SP_ON); //確認用:PCへ現在の各変数の値を送信 - pc.printf("ON tunedValue= '%f' interval= '%f' \n\r", tunedValue, interval); + pc.printf("ON tunedValue= '%f' interval= '%f' \r\n", tunedValue, interval); } wait(0.1); }