cltp(仮), 日本語があるので修正必要。

Dependencies:   mbed HEPTA_CDH_lite LPS25HB_I2C

Committer:
heptasat2021
Date:
Mon Aug 23 07:20:32 2021 +0000
Revision:
3:f64ab3adcac5
Parent:
2:e181e5c64233
Child:
4:36a7b7878738
For Hepta-Sat Lite

Who changed what in which revision?

UserRevisionLine numberNew contents of line
heptasat2021 0:da0f6aca15b8 1 #include "mbed.h"
heptasat2021 2:e181e5c64233 2 #include "HEPTA_EPS.h"
heptasat2021 1:ddac5ec89167 3 #include "HEPTA_CDH.h"
heptasat2021 3:f64ab3adcac5 4
heptasat2021 3:f64ab3adcac5 5
heptasat2021 0:da0f6aca15b8 6 Serial pc(USBTX,USBRX,9600);
heptasat2021 0:da0f6aca15b8 7 int main()
heptasat2021 0:da0f6aca15b8 8 {
heptasat2021 2:e181e5c64233 9 float btvol;
heptasat2021 2:e181e5c64233 10 char str[100];
heptasat2021 1:ddac5ec89167 11 mkdir("/sd/mydir", 0777);
heptasat2021 2:e181e5c64233 12 FILE *fp = fopen("/sd/mydir/data.txt", "w");
heptasat2021 1:ddac5ec89167 13 if(fp == NULL) {
heptasat2021 1:ddac5ec89167 14 error("Could not open file for write\r\n");
heptasat2021 0:da0f6aca15b8 15 }
heptasat2021 2:e181e5c64233 16 for(int i=0;i<10;i++) {
heptasat2021 2:e181e5c64233 17
heptasat2021 2:e181e5c64233 18
heptasat2021 2:e181e5c64233 19
heptasat2021 2:e181e5c64233 20 }
heptasat2021 1:ddac5ec89167 21 fclose(fp);
heptasat2021 2:e181e5c64233 22 fp = fopen("/sd/mydir/data.txt","r");
heptasat2021 2:e181e5c64233 23 for(int i=0;i<10;i++) {
heptasat2021 2:e181e5c64233 24
heptasat2021 2:e181e5c64233 25
heptasat2021 2:e181e5c64233 26 }
heptasat2021 2:e181e5c64233 27 fclose(fp);
heptasat2021 2:e181e5c64233 28 pc.printf("Goodbye!\r\n");
heptasat2021 0:da0f6aca15b8 29 }