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
Diff: main.cpp
- Revision:
- 0:bd0a2325eb65
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Oct 12 09:01:09 2018 +0000 @@ -0,0 +1,21 @@ +#include "mbed.h" +#include <stdio.h> + +int main(void) { + float culculate_distance_3(float a,float b); + float a,b,c; + a=3;//加速度センサから求めた距離 + b=8;//フォトから求めた距離 + + printf("distance3=%f",culculate_distance_3(a,b)); + return 0; +} + +//二つの距離から一つの距離を算出 + +float culculate_distance_3(float a,float b) { + float c; + c=0.5*a+0.5*b;//今は平均。計測をもとに修正を加える + return c; +} +}