キャタピラ用

Dependencies:   2342L012CR HCSR04 L6470 test_test MMA8451Q TSI mbed

Files at this revision

API Documentation at this revision

Comitter:
e00nagog
Date:
Sat Nov 02 05:01:36 2013 +0000
Commit message:
???????????

Changed in this revision

2342L012CR.lib Show annotated file Show diff for this revision Revisions of this file
HCSR04.lib Show annotated file Show diff for this revision Revisions of this file
L6470.lib Show annotated file Show diff for this revision Revisions of this file
LCD.lib Show annotated file Show diff for this revision Revisions of this file
MMA8451Q.lib Show annotated file Show diff for this revision Revisions of this file
TSI.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/2342L012CR.lib	Sat Nov 02 05:01:36 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/e00nagog/code/2342L012CR/#56bba8101e52
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/HCSR04.lib	Sat Nov 02 05:01:36 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/aralshukaili/code/HCSR04/#0bda99bb39a4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/L6470.lib	Sat Nov 02 05:01:36 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/Brid/code/L6470/#bb4bb05904cb
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LCD.lib	Sat Nov 02 05:01:36 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/e00nagog/code/test_test/#1f8005f33f67
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MMA8451Q.lib	Sat Nov 02 05:01:36 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/JoKer/code/MMA8451Q/#2d14600116fc
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TSI.lib	Sat Nov 02 05:01:36 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/emilmont/code/TSI/#507b1f67804b
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat Nov 02 05:01:36 2013 +0000
@@ -0,0 +1,117 @@
+//DC_Moter
+//2013.11.02
+//Ver 0.0.001
+//m.saito
+
+#include "mbed.h"
+#include "TSISensor.h"
+
+int main() {
+    PwmOut M1IN1(PTD4);
+    PwmOut M1IN2(PTA12);
+    PwmOut M2IN1(PTA4);
+    PwmOut M2IN2(PTA5);    
+    TSISensor tsi;
+    
+    while(1){
+        M1IN1 = 0;
+        M1IN2 = 0;
+        M2IN1 = 1.0;
+        M2IN2 = 0;
+    }
+}
+
+
+
+
+/*
+//step_Moter
+//2013.10.19
+//Ver 0.0.001
+//m.saito
+
+#include "mbed.h"
+#include "L6470.h"
+
+//Serial pc(USBTX, USBRX); 
+L6470 step1(PTD2, PTD3, PTD1,PTC0); // mosi, miso, sclk
+//L6470 step2(p5, p6, p7,p11); // mosi, miso, sclk
+
+
+int main() 
+{
+    step1.Resets();
+    //step2.Resets();
+    
+    step1.Run(1,0x800);
+    //step2.Run(1,0x800);
+
+
+   wait_us(1);
+}
+*/
+
+
+
+
+/*
+
+
+//DC_Moter(G-sensor,touchpad)
+//Ultrasonic
+//2013.10.12
+//Ver 0.0.001
+//m.saito
+
+#include "mbed.h"
+#include "TSISensor.h"
+#include "MMA8451Q.h"
+#include "LCD.h"
+#include "HCSR04.h"
+
+#define MMA8451_I2C_ADDRESS (0x1d<<1)
+
+int main(void) {
+
+//class-object
+    HCSR04 sensor(PTC10, PTC11);                      //Ultrasonic
+    LCD lcd(PTE0,PTE1);                               //LCD
+    MMA8451Q acc(PTE25, PTE24, MMA8451_I2C_ADDRESS);  //G-sensor
+    PwmOut mtr(PTA12);                                //cw-only
+    TSISensor tsi;                                    //touchpad-sensor
+   
+//variable
+    float g = 0;                                      //G-sensor
+    char g_str[20];
+    float tp=0;                                       //touchpad
+    char tp_str[20];
+    long length;                                      //Ultrasonic-length
+    char lg_str[20];
+
+    mtr = 1;                                          //Duty Ratio
+    
+    while (1) 
+    {   
+        g = acc.getAccX()*90;                         //kakudo hyouji
+        tp  = tsi.readPercentage();
+        mtr = (tsi.readPercentage()==0)?(1-abs(acc.getAccX())):tp;
+        wait(0.1);
+        
+        length = sensor.distance(1);                  //cm-hyouji
+        
+        lcd.cls();
+        lcd.locate(0,0);
+        sprintf (g_str,"%+5.1f",g);
+        lcd.printf("%s%s",g_str,"do");
+        lcd.locate(0,1);
+        sprintf (tp_str,"%+5.3f",tp);
+        lcd.printf("%s%s",tp_str,"tp");
+        wait (0.5);
+        lcd.cls();
+        sprintf (lg_str,"%5d",length);
+        lcd.printf("%s%s",lg_str,"cm");
+        wait (0.5);
+    }
+}
+
+*/
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sat Nov 02 05:01:36 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/9c8f0e3462fb
\ No newline at end of file