This is a remote control tester, it uses a CNC, Ethernet Communication with a JAVAFX interface and a PLC in order to control some valves.

Dependencies:   EthernetInterface mbed-rtos mbed

Fork of CNC_CONTROLLER by Lahis Almeida

Debug.cpp

Committer:
kevencastro7
Date:
2017-12-15
Revision:
2:835c883d81b0
Parent:
0:7cedfb720712

File content as of revision 2:835c883d81b0:

#include "Debug.h"

Debug::Debug(){
    debugPin_1 = new DigitalOut(LED1);
    debugPin_2 = new DigitalOut(LED2);
    debugPin_3 = new DigitalOut(LED3);
    debugPin_4 = new DigitalOut(LED4);
}


void Debug::debugPin(int led, int state){

    switch(led){
        case 1:
            debugPin_1->write(state);
            break;
        case 2:
            debugPin_2->write(state);
            break;
        case 3:
            debugPin_3->write(state);
            break;
        case 4:
            debugPin_4->write(state);
            break;
        default:
            debugPin_1->write(state);
            debugPin_2->write(state);
            debugPin_3->write(state);
            debugPin_4->write(state);
            break;
    }
    
}