SpeedSensor.cpp 609 Bytes
Newer Older
1
2
3
4
#include "SpeedSensor.h"
#include "Arduino.h"

SpeedSensor::SpeedSensor(int speedSendPinIn){
Manuel Pitz's avatar
Manuel Pitz committed
5
  SpeedSensor::speedSendPin=speedSendPinIn;
6
7
8
9
10
11
12
}

SpeedSensor::~SpeedSensor() {
}

void SpeedSensor::setup(){
  pinMode(SpeedSensor::speedSendPin, INPUT);
Manuel Pitz's avatar
Manuel Pitz committed
13
  attachInterrupt(digitalPinToInterrupt(SpeedSensor::speedSendPin), speedInterrupt, CHANGE);  
14
15
}

Manuel Pitz's avatar
Manuel Pitz committed
16
//The following function needs modifications
17
18
19
20
void SpeedSensor::interrupt(unsigned long now) {

}

Manuel Pitz's avatar
Manuel Pitz committed
21
//The following function needs modifications
22
23
24
25
bool SpeedSensor::getState() {  

}

Manuel Pitz's avatar
Manuel Pitz committed
26
//The following function needs modifications
27
double SpeedSensor::getSpeed() {  
Manuel Pitz's avatar
Manuel Pitz committed
28
  
29
30
}