Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //file Motore.cpp
- #include "Arduino.h"
- #include "Motore.h"
- Motore::Motore(int avPin,int indPin, int orAntiorPin, int onOffPin){
- pinMode(avPin, INPUT);
- pinMode(indPin, INPUT);
- pinMode(orAntiorPin, OUTPUT);
- pinMode(onOffPin, OUTPUT);
- _avPin = avPin;
- _indPin = indPin;
- _orAntiorPin = orAntiorPin;
- _onOffPin = onOffPin;
- }
- void Motore::orario(){
- digitalWrite(_orAntiorPin, HIGH);
- delay(50);
- }
- void Motore::antiOrario(){
- digitalWrite(_orAntiorPin, LOW);
- delay(50);
- }
- void Motore::spento(){
- digitalWrite(_onOffPin, LOW);
- delay(50);
- }
- void Motore::acceso(){
- digitalWrite(_onOffPin, HIGH);
- delay(50);
- }
- int Motore::indPin(){
- return _indPin;
- }
- int Motore::avPin(){
- return _avPin;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement