Creating a CoxBox with the mbed
Dependencies: mbed C12832 SMARTGPU2
HallEffect.cpp
- Committer:
- jad19925
- Date:
- 2014-05-04
- Revision:
- 2:552b4c2844ca
- Child:
- 8:ae9f6033daa0
File content as of revision 2:552b4c2844ca:
#include "HallEffect.h" HallEffect::HallEffect(){ strokeCount = 0; timeBetweenStrokes[0] = 0; // interrupt = in; // interrupt.rise(&hallISR); } //HallEffect::HallEffect(){ // strokeCount = 0; // timeBetweenStrokes[0] = 0; //// InterruptIn in(p5); //// interrupt = in; //// interrupt.rise(&hallISR); //} int HallEffect::getSPM(){ return -1; } int HallEffect::getCount(){ return strokeCount/2; } void HallEffect::resetCount(){ strokeCount = 0; } void HallEffect::recordStroke(){ strokeCount++; } //HallEffect::hallISR(){ // strokeCount++; //}