ALPHA_A

Dependencies:   DataPool MD_PID mbed

main.cpp

Committer:
hirotayamato
Date:
2017-09-07
Revision:
3:42fdfd41f96a
Parent:
1:3082e5f990cd
Child:
4:169a7b6c0138

File content as of revision 3:42fdfd41f96a:

#include "mbed.h"

#include "2017_4.h"

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

Mekanamu_4 Mekanamu(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;

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