ALPHA_A

Dependencies:   DataPool MD_PID mbed

main.cpp

Committer:
hirotayamato
Date:
2017-09-14
Revision:
5:1142db72d16d
Parent:
4:169a7b6c0138
Child:
6:bb5e51ded250

File content as of revision 5:1142db72d16d:

#include "mbed.h"

#include "2017_4.h"

#include "AlphaTransporter.h"
#include "DataPool.h"

Mecanamu_4 Mecanamu(PA_8, PB_0, PA_2, PA_7, PA_11, PB_1, PA_6, PA_5, PB_5, PF_0, PA_4, PA_3, PB_4, PF_1, PA_1, PA_0, 1);
Serial pc(USBTX, USBRX);

int main() {
    DataPool *alpha;

    alpha = new AlphaTransporter;

    Mecanamu.Drive(0, 0, 0);
    float x, y, t;
    while(1) {
        alpha->set();
        x = alpha->read(0) / 128.00;
        y = alpha->read(1) / 128.00;
        t = alpha->read(2) / 128.00;
        Mecanamu.Drive(x, y, t);
    }
}