Railway Challenge
/
challenge
Uncommenting of part that allow supercaps to charge up from the batteries
dashboard.h
- Committer:
- jamesmcildowietfl
- Date:
- 2022-06-15
- Revision:
- 30:a04afea230fb
- Parent:
- 0:4788e1df7b55
File content as of revision 30:a04afea230fb:
#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