UvA NetCentric Computing listener

Dependencies:   AndroidAccessory Controls HBridge MotorController mbed

Fork of uva_nc by Jurgen Baas

main.cpp

Committer:
Sinterbaas
Date:
2016-01-10
Revision:
7:d9d30a2d8d9f
Parent:
4:eabd917e3353

File content as of revision 7:d9d30a2d8d9f:

#include "NetCentricApp.h"
#include "mbed.h"
#include "HBridge.h"
#include "PcControls.h"

AnalogIn motorInput(p16);
DigitalOut outSignal(p18);

HBridge motor(p18,p15,p22);


int main() {
    printf("Started NetCentric App\r\n");
    
    MotorController motorController(motor, motorInput);
    MotorControlsPc pcControls(motorController);
    
    NetCentricApp app(pcControls);
    
    USBInit();
    while (true) {
        pcControls.ProcessPcInput((char) motorController.getCurrentAction());
        USBLoop();
        wait(0.001);
    }
}