1 /* sample.cpp for TOPPERS/ATK(OSEK) */
\r
7 #include "Daq.h" // DAQ class for NXT GamePad
\r
8 #include "Bluetooth.h"
\r
9 #include "BTConnection.h"
\r
10 using namespace ecrobot;
\r
14 static const CHAR* PASSKEY = "1234";
\r
19 #include "kernel_id.h"
\r
20 #include "ecrobot_interface.h"
\r
22 /* nxtOSEK hook to be invoked from an ISR in category 2 */
\r
23 void user_1ms_isr_type2(void){}
\r
30 BTConnection btConnection(bt, lcd, nxt);
\r
32 if (btConnection.connect(PASSKEY) == 1)
\r
35 S8 dataS08[2] = {0};
\r
38 lcd.putf("s", "DAQ");
\r
45 daq.send(dataS08, dataS32); // send data to NXT GamePad utility on PC
\r