You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

26 lines
389 B

#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;
}