QAQ ==!
Dependencies: mbed QEI-1 nRF24L01P xiugai
Diff: main.cpp
- Revision:
- 13:99e774135a00
- Parent:
- 12:741de117e1ee
- Child:
- 14:5bc7349d0e3b
--- a/main.cpp Fri Nov 29 16:07:26 2019 +0000 +++ b/main.cpp Mon Dec 02 06:53:14 2019 +0000 @@ -4,20 +4,23 @@ #include <string> typedef bool boolean; typedef std::string String; -#include "SYN6288.h" +#include "eeprom.h" +#include "ir.h" -String str; - -Serial syn6288_Serial_2(PA_2,PA_3); +EEPROM eeprom(PB_7,PB_6,0,EEPROM::T24C02); +Serial Serial_2(PA_2,PA_3); int main() { -for (int count = 0; count < 100; count++) { -str = "\xc4\xe3\xba\xc3"; -str += String("\xca\xc0\xbd\xe7"); -voice_play(str,&syn6288_Serial_2); -wait_ms(2000); -} +Serial_2.baud(9600); + +IR_Init(PB_10,PB_11,PA_5,eeprom); + +Serial_2.printf("learning\n"); +IR_StartLearning(1); +Serial_2.printf("learned\n"); +IR_Emit(1); +Serial_2.printf("sent\n"); } \ No newline at end of file