My personal forkk

Dependencies:   mbed millis

dashboard.h

Committer:
cdevarakonda
Date:
23 months ago
Revision:
34:27f82e3d2426
Parent:
0:4788e1df7b55

File content as of revision 34:27f82e3d2426:

#ifndef _DASHBOARD_H_
#define _DASHBOARD_H_

#include <mbed.h>

class Dashboard {
    public:
        Dashboard(InterruptIn& hallSensor);    // CONSTRUCTOR
        
        void tachoInterrupt();
        void getCurrentSpeed();
        
        int currentSpeed;
        float currentDistance;
        
    private:
        InterruptIn& _hallSensor;
        Timer tachoTimer;
        int passedTime_ms;
        float passedTime;
        float lastTime;
        float wheelFreq;
        float wheelCircumference;
        int numberOfMagnets;
        int tachoCounter;
        int currentTime;
};

#endif