Andrea Pallotta
/
Nucleo_analog_loop
import test
Diff: main.cpp
- Revision:
- 1:89aa667d1a9b
- Parent:
- 0:bf84ee4ea1d2
- Child:
- 2:b4f8b72a22ec
--- a/main.cpp Fri May 13 09:21:10 2016 +0000 +++ b/main.cpp Mon Dec 19 14:55:38 2016 +0000 @@ -1,5 +1,6 @@ #include "mbed.h" +LocalFileSystem local("local"); // Create the local filesystem under the name "local" AnalogIn in(A0); #if !DEVICE_ANALOGOUT @@ -10,8 +11,13 @@ DigitalOut led(LED1); + int main() { + FILE *fp = fopen("/local/out.txt", "w"); // Open "out.txt" on the local file system for writing + fprintf(fp, "Hello World!"); + fclose(fp); + printf("\nAnalog loop example\n"); printf("*** Connect A0 and PA_4 pins together ***\n"); while(1) {