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
Revision 0:4a721db37680, committed 2020-05-14
- Comitter:
- gr91
- Date:
- Thu May 14 15:51:47 2020 +0000
- Commit message:
- MB2LV : MBED to labVIEW demo
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 Thu May 14 15:51:47 2020 +0000 @@ -0,0 +1,26 @@ +#include "mbed.h" +#define PI 3.14f +Serial pc(SERIAL_TX, SERIAL_RX); +Ticker mesure; +bool f_mesure=0 ;// flag ticker +void t_mesure() +{ + f_mesure=1; +} + +DigitalOut led(LED1); + +int main() +{ + pc.baud(9600); + pc.printf("Hello World !\n"); + mesure.attach(&t_mesure,0.1); + int i = 0; + while(1) { + if(f_mesure) { + pc.printf("%f %f\r\n", sin(2*PI*i/100),cos(2*PI*i/100)); + i++; + f_mesure=0; + } + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu May 14 15:51:47 2020 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file