test
Dependents: LSI_Compass loop_test CanSat-C_test test
Revision 5:61aadb168ef3, committed 2021-11-06
- Comitter:
- miyajitakenari
- Date:
- Sat Nov 06 03:07:01 2021 +0000
- Parent:
- 4:6dd04e220a4c
- Commit message:
- a
Changed in this revision
ATP3011.h | Show annotated file Show diff for this revision Revisions of this file |
speak.h | Show diff for this revision Revisions of this file |
--- a/ATP3011.h Thu Nov 04 11:34:27 2021 +0000 +++ b/ATP3011.h Sat Nov 06 03:07:01 2021 +0000 @@ -5,25 +5,6 @@ #define AQTK_STARTUP_WAIT_MS 80 #define AQTK_POLL_WAIT_MS 10 -/** ATP3011 class - * - * AquesTalk pico LSI I2C interface - * Example: - * @code - * #include "ATP3011.h" - * ATP3011 talk(P0_10,P0_11); // I2C sda scl - * - * int main() { - * talk.Synthe("konnichiwa."); - * for(int n = 1; ; n++) { - * char buf[32]; - * snprintf(buf, sizeof(buf), "<NUMK VAL=%d>.", n); - * talk.Synthe(buf); - * } - * } - * @endcode - * - */ class ATP3011 { public: /** Create a AquesTalk pico LSI I2C interface
--- a/speak.h Thu Nov 04 11:34:27 2021 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -#include "ATP3011.h" - -ATP3011 talk(D4,D5); // I2C sda scl - - /*地上局から新情報を送るときはflag=がでてきたらスペースか.を入力 - 3秒後ぐらいにmessage=が出てくるので、そしたら新情報を入力*/ -void speak() -{ - int timeout_ms=500; - char mess[100]; - if(talk.IsActive(timeout_ms)==true){ - pc.printf("Active\n\rflag="); - wait(3); - if(pc.readable()){ //pc.readable() - pc.printf("\n\rmessage="); - int i=0; - do{ - //mess[i++]= pc.getc(); - mess[i++]= pc.getc(); - } - while(mess[i-1]!= 0x0d && i<99); - talk.Synthe(mess); - } - else{ - pc.printf("preset_message speak\r\n"); - talk.Synthe("purissetommese-ji,,konnichiwa."); - } - } - else{ - pc.printf("Not Active\n"); - } -} \ No newline at end of file