BluetoothHc05 + wtv020sd16p
Dependencies: TextLCD WTV020SD_Sound_Breakout_Library mbed
Revision 0:349db9f6bfd6, committed 2016-11-21
- Comitter:
- Mattinico
- Date:
- Mon Nov 21 21:18:09 2016 +0000
- Commit message:
- k
Changed in this revision
diff -r 000000000000 -r 349db9f6bfd6 TextLCD.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TextLCD.lib Mon Nov 21 21:18:09 2016 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/teams/MEM/code/TextLCD/#308d188a2d3a
diff -r 000000000000 -r 349db9f6bfd6 WTV020SD_Sound_Breakout_Library.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/WTV020SD_Sound_Breakout_Library.lib Mon Nov 21 21:18:09 2016 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/users/ejteb/code/WTV020SD_Sound_Breakout_Library/#d6b7b90b4387
diff -r 000000000000 -r 349db9f6bfd6 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Nov 21 21:18:09 2016 +0000 @@ -0,0 +1,37 @@ +#include "mbed.h" +#include "soundboard.h" +#include "TextLCD.h" +Serial pc (SERIAL_TX, SERIAL_RX); +RawSerial hc05(D8, D10); +soundboard mySoundBoard(D1, D2, D3, D4); +TextLCD lcd(D12, D11, D5, D6, D7, D9) + + + +int main() { + char a; + pc.baud(9600); // setto il baud rate della porta seriale pc + hc05.baud(9600); // setto il baud rate della porta rawserial hc05 + + while(1){ + if(hc05.readable ()){ + a=hc05.getc(); + switch (a){ + case '1': { + lcd.printf("Traccia 1\n"); + msb.playAsync(0); + break; + } + case '2':{ + lcd.printf("Traccia 2\n"); + msb.playAsync(1); + break; + } + case '3':{ + lcd.printf("Traccia 3\n"); + msb.playAsync(2); + break; + } + } + } +} \ No newline at end of file
diff -r 000000000000 -r 349db9f6bfd6 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Nov 21 21:18:09 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/0ab6a29f35bf \ No newline at end of file