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 ADT7410 FlashAir_iSDIO SDFileSystem USBDevice
Diff: main.cpp
- Revision:
- 8:49dfc9ab1950
- Parent:
- 7:c2097153ff5c
- Child:
- 9:e4bd6b88187d
--- a/main.cpp Fri Jan 18 13:30:21 2019 +0000 +++ b/main.cpp Sat Jan 19 03:35:31 2019 +0000 @@ -90,6 +90,16 @@ wait(3.0); } +#if 1 +void write_shmem(float val) +{ + char data[255]; + sprintf(data, "%.02f", val); + sd.write_shared_mem(0x0, (uint8_t*)data, sizeof(data)); + wait(1.0); +} +#endif + void seg_disp(int val){ switch((val/10)%10){ case 0:sA1=1;sA2=1;sB=0;sF=0;sJ=1;sK=0;sL=1;break; @@ -134,6 +144,7 @@ int main() { console.printf("Hello FlashAIr_iSDIO_16seg_ADT7410\n"); + wait(1.0); SD_VEN = 1; // Initialize card FILE *fp = fopen("/sd/isdio.txt", "w"); @@ -163,6 +174,7 @@ #endif seg_disp(sense_int); out_file(senseval); + write_shmem(senseval); serial.printf("%f\n",senseval); i++; #ifndef USE_ADT7410