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.
Fork of forcesensor_v1 by
Revision 0:811dd69a17ee, committed 2017-03-03
- Comitter:
- DimpleB05
- Date:
- Fri Mar 03 09:12:55 2017 +0000
- Child:
- 1:0d358560594b
- Commit message:
- force_sensor_readingadcvaluemapping_tested teraterm;
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Mar 03 09:12:55 2017 +0000 @@ -0,0 +1,22 @@ + +#include "mbed.h" +#define BAUDRate 115200 + +AnalogIn in(A0); +Serial pc(USBTX, USBRX); +int in_value=0; +float voltage = 0; + +int main() { + pc.baud(BAUDRate); + pc.printf("Clock speed: %d\r\n", SystemCoreClock); + + while(1) { + + in_value = in.read_u16()>>4; + voltage = (in_value * 3.3)/4096; + pc.printf("%d,%f\r\n",in_value, voltage); + wait(1); + } + +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Mar 03 09:12:55 2017 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/e1686b8d5b90 \ No newline at end of file