Need solution step by step Solutionnew header file for LEDPi

Need solution step by step



Solution

//new header file for LEDPin 5

#include<Arduino.h>

#define LED5

#ifndef LED5

Class LED5{

Public:

            LED5();                         

            ~LED5();

            Void on();

            Void off()

}

#endif

-----------------------------------------------------------------------------------------------------

#include<LED5.h>

Const byte LED_Pin=5   //connect 5 pin LED

LED5::LED5()                //calling constructer

{

PinMode(LED_Pin,Output); // set the digital pin as output

}

LED5::~LED5() //distracter

{    //do nothing

}

Void LED5::on()                  //LED Turn on Function

{

digitalWrite(LED_Pin,High);

}

Void LED5::off()          //LED Turn off Funtion

{

digitalWrite(LED_Pin,LOW);

}

//create a object according to your timer

Need solution step by step Solution//new header file for LEDPin 5 #include<Arduino.h> #define LED5 #ifndef LED5 Class LED5{ Public: LED5(); ~LED5(); Void
Need solution step by step Solution//new header file for LEDPin 5 #include<Arduino.h> #define LED5 #ifndef LED5 Class LED5{ Public: LED5(); ~LED5(); Void

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site