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.
Dependencies: mbed-dsp
Fork of mbed-os-example-blinky by
main.cpp
- Committer:
- NicklasNp
- Date:
- 2017-03-29
- Revision:
- 41:b34a65881a45
- Parent:
- 39:c92c150c0dd2
- Child:
- 42:67bf737a923d
File content as of revision 41:b34a65881a45:
#include "mbed.h" DigitalOut led1(LED1); // main() runs in its own thread in the OS int main() { while (true) { led1 = !led1; //ändrade värdet från 0.5 till 0.6 wait(2); } } //Calculating distanse between sound and camera double calcDis(double t, double v){ double s = t*v; return s; } //Calculating angle in radians, D distanse between mic1 and mic2 double calcAng(double s, double D){ double ang = asin(s/D); return ang; } //Presuming the input value is temp as a nuber and humidity as procent double speedofsound(double temp, double hum){ //Calculations done in Matlab double speed = 331.1190 + 0.6016*temp + 0.0126*hum; return speed; }