2021 rcj

Dependencies:   _sensorGen ui Robot omni_wheel PID jy901 solenoid IRsensor aqm0802 camera beep kohiMD linesSnsor lpf RCJESC

Files at this revision

API Documentation at this revision

Comitter:
THtakahiro702286
Date:
Fri Mar 05 00:01:18 2021 +0000
Parent:
1:e8c3c7f14070
Child:
3:f763ce2f35db
Commit message:
nannkaugoita

Changed in this revision

Robot.lib Show annotated file Show diff for this revision Revisions of this file
lib/kohiMD.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
--- a/Robot.lib	Thu Mar 04 14:25:52 2021 +0000
+++ b/Robot.lib	Fri Mar 05 00:01:18 2021 +0000
@@ -1,1 +1,1 @@
-https://os.mbed.com/teams/Quadrifoglio/code/Robot/#104dfa57a0e7
+https://os.mbed.com/teams/Quadrifoglio/code/Robot/#39f44a1dc256
--- a/lib/kohiMD.lib	Thu Mar 04 14:25:52 2021 +0000
+++ b/lib/kohiMD.lib	Fri Mar 05 00:01:18 2021 +0000
@@ -1,1 +1,1 @@
-https://os.mbed.com/teams/Quadrifoglio/code/kohiMD/#d7e8402e6869
+https://os.mbed.com/teams/Quadrifoglio/code/kohiMD/#ba7b31b888f2
--- a/main.cpp	Thu Mar 04 14:25:52 2021 +0000
+++ b/main.cpp	Fri Mar 05 00:01:18 2021 +0000
@@ -1,19 +1,21 @@
 #include "main.h"
 #include "robot.h"
-#include "sensorGen.h"
+//#include "sensorGen.h"
 #include "ui.h"
+//#include "kohiMD.h"
 
 Robot robo;
 UI ui;
 Thread displaythread;
 sensorgen sensor_;
 BufferedSerial pc(USBTX, USBRX, 115200);
+KohiMD *md[4] = {new KohiMD(PA_15), new KohiMD(PA_6), new KohiMD(PA_7), new KohiMD(PB_6)};
 
 
 void main2ui()
 {
     char lcdname1[4] = {}, lcdname2[4] = {};
-    int  lcdvalue[4] = {};
+    int  lcdvalue[2] = {};
     double temp[2] = {};
     while(1){
 //        printf("test\r\n");
@@ -48,8 +50,8 @@
                 strcpy(lcdname2, "mt3");
                 temp[0] = robo.omni.wheel[2];
                 temp[1] = robo.omni.wheel[3];
-                lcdvalue[2] = temp[0] * 100;
-                lcdvalue[3] = temp[1] * 100;
+                lcdvalue[0] = temp[0] * 100;
+                lcdvalue[1] = temp[1] * 100;
         /*} else if(ui.displayst == 6) {
                 strcpy(lcdname1, "ln1");
                 strcpy(lcdname2, "ln2");
@@ -75,6 +77,7 @@
     bool startflag;
     while(1){
         robo.motorStop(0.0);
+//        for (int i=0; i < 4; i++) md[i]->setSpeed(0.0);
         /*
         ui.returnbt(uibt);
 //        printf("%d  %d  %d  %d   %d\r\n", uibt[0], uibt[1], uibt[2], uibt[3], ui.start);