ヌンチャクでコントロールするチョロQ機能に限定した物です。

Fork of StarBoardOrangeExample3 by Shinichiro Nakamura

Files at this revision

API Documentation at this revision

Comitter:
jksoft
Date:
Sat Aug 18 13:21:50 2012 +0000
Parent:
1:03c8bc666945
Commit message:
Rev1

Changed in this revision

extlib/TextLCD.lib Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/extlib/TextLCD.lib	Mon Sep 20 02:09:54 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-http://mbed.org/users/simon/code/TextLCD/#44f34c09bd37
--- a/main.cpp	Mon Sep 20 02:09:54 2010 +0000
+++ b/main.cpp	Sat Aug 18 13:21:50 2012 +0000
@@ -28,7 +28,6 @@
 #include <ChoroQ.h>
 #include <I2CConfig.h>
 #include <WiiNunchuckReader.h>
-#include <TextLCD.h>
 #include "appconf.h"
 
 /*
@@ -37,27 +36,6 @@
 
 WiiNunchuckReader wn(I2CPort_A::SDA, I2CPort_A::SCL);
 ChoroQ cq(p21);
-TextLCD lcd(p24, p26, p27, p28, p29, p30);
-BusOut led(LED4, LED3, LED2, LED1);
-
-/**
- * Display a splash screen.
- */
-void splash(void) {
-    lcd.cls();
-    lcd.locate(0, 0);
-    lcd.printf("StarBoard Orange");
-    lcd.locate(0, 1);
-    lcd.printf("mbed NXP LPC1768");
-    wait(3);
-
-    lcd.cls();
-    lcd.locate(0, 0);
-    lcd.printf("Example app No.3");
-    lcd.locate(0, 1);
-    lcd.printf(" CHORO Q HYBRID ");
-    wait(3);
-}
 
 /**
  * Get an action from a coordinate.
@@ -144,11 +122,6 @@
  * Entry point.
  */
 int main() {
-    /*
-     * Splash.
-     */
-    splash();
-    lcd.cls();
 
     /*
      * Setup a configuration.
@@ -165,65 +138,7 @@
 
         ChoroQ::Action ac = getAction(wn.getJoyX(), wn.getJoyY(), (wn.getButtonZ() == 1) ? true : false);
         cq.execute(conf.channel, ac);
-
-        lcd.locate(0, 0);
-        lcd.printf("JS  :(%3d,%3d) %s", wn.getJoyX(), wn.getJoyY(), ((wn.getButtonZ() == 1) ? "D" : " "));
-
-        char *stattext = "";
-        switch (ac) {
-            case ChoroQ::Undef:
-                stattext = "Undef";
-                break;
-            case ChoroQ::Up:
-                stattext = "Up";
-                break;
-            case ChoroQ::Down:
-                stattext = "Down";
-                break;
-            case ChoroQ::Left:
-                stattext = "Left";
-                break;
-            case ChoroQ::Right:
-                stattext = "Right";
-                break;
-            case ChoroQ::UpDash:
-                stattext = "Up       +D";
-                break;
-            case ChoroQ::UpLeft:
-                stattext = "UpLeft";
-                break;
-            case ChoroQ::UpRight:
-                stattext = "UpRight";
-                break;
-            case ChoroQ::UpRightDash:
-                stattext = "UpRight  +D";
-                break;
-            case ChoroQ::UpLeftDash:
-                stattext = "UpLeft   +D";
-                break;
-            case ChoroQ::DownLeft:
-                stattext = "DownLeft";
-                break;
-            case ChoroQ::DownRight:
-                stattext = "DownRight";
-                break;
-            case ChoroQ::DownDash:
-                stattext = "Down     +D";
-                break;
-            case ChoroQ::DownLeftDash:
-                stattext = "DownLeft +D";
-                break;
-            case ChoroQ::DownRightDash:
-                stattext = "DownRight+D";
-                break;
-            case ChoroQ::Stop:
-                stattext = "Stop";
-                break;
-        }
-        lcd.locate(0, 1);
-        lcd.printf("Ch.%c:%-11.11s", 'A' + (int)conf.channel, stattext);
-
+        
         wait_ms(50);
-        led = led + 1;
     }
 }