#include"led.h"
|
|
#include<string>
|
|
using namespace std;
|
|
|
|
int main(int argc, char* argv[]){
|
|
CLED led1 = CLED(3);
|
|
string cmd(argv[1]);
|
|
|
|
if(argc!=2)
|
|
std::cout << "Incorrect number of arguments" << std::endl;
|
|
|
|
if(cmd=="on")
|
|
led1.TurnOn();
|
|
|
|
else if(cmd=="off")
|
|
led1.TurnOff();
|
|
|
|
else if(cmd=="blink")
|
|
led1.BlinkLED();
|
|
|
|
else
|
|
cout << "Invalid command" << endl;
|
|
|
|
return 0;
|
|
}
|
|
|