Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Anemometer.cpp
- Committer:
- khaiminhvn
- Date:
- 2021-02-09
- Revision:
- 0:306d17b459bd
- Child:
- 1:4a44fc4e5157
File content as of revision 0:306d17b459bd:
//INCLUDES #include "Anemometer.h" //Constructor Anemometer::Anemometer() : ane(PIN_ANEMOMETER) { wthres = WIND_THRES_INIT; } //getWind float Anemometer::getWind() { float spd; spd = 72.9*ane-29.16; return (spd < 0)? 0:spd; } //setThres void Anemometer::setThres(int thres) { wthres = thres; } //checkWind void Anemometer::checkWind(int* mode) { *mode = (Anemometer::getWind() >= wthres)? OP_WIND:OP_NORMAL; }