//=============================================================================
// Main Task
TASK(TaskMain)
{
// establish blutooth connection with a PC to use a PC HID GamePad controller
BTConnection btConnection(bt, lcd, nxt);
(void)btConnection.connect(BT_PASS_KEY);
for (U32 i = 5; i <= Lcd::MAX_CURSOR_Y; i++) lcd.clearRow(i);
lcd.cursor(0,5);
lcd.putf("snsns", "TOUCH:START/STOP", "STAND IT UP AND", "WAIT FOR A BEEP.");
lcd.disp();
SetRelAlarm(Alarm4msec, 1, 4); // Set 4msec periodical Alarm for the drive event
while(1)
{
sonarDriver.checkObstacles(sonar);
clock.wait(40); // 40msec wait
}
}
はじめに
環境構築
LEGO の組み立て
nxtOSEK 環境設定(Windows XP/Vista)
拡張 NXT ファームウェアの NXT へのアップロード
NXTway ソース修正及びコンパイル
NXT 側のソース修正及びコンパイル、アップロード
動作確認
NXT側の起動
PC 側 RTC の起動