![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
ルンバハック用.
Song_Hack.cpp
- Committer:
- naoki_westwell
- Date:
- 2016-06-24
- Revision:
- 0:ac1e1657002a
File content as of revision 0:ac1e1657002a:
#include "mbed.h" #include <System_Select.h> #ifdef SONG_HACK Serial Roomba(p9, p10); void send_cmd(char command); int main(){ Roomba.baud(115200); send_cmd(START); send_cmd(SAFE); wait(5); send_cmd(SONG); send_cmd(0); send_cmd(8); send_cmd(0x18); send_cmd(32); send_cmd(0x1A); send_cmd(32); send_cmd(0x1C); send_cmd(32); send_cmd(0x1D); send_cmd(32); send_cmd(0x1F); send_cmd(32); send_cmd(0x21); send_cmd(32); send_cmd(0x23); send_cmd(32); send_cmd(0x24); send_cmd(32); wait(1); send_cmd(PLAY); send_cmd(0); } void send_cmd(char command){ Roomba.putc(command); } #endif