test
Dependencies: mbed Lab5-03_create_satcode_step6_lite HEPTA_CDH_lite HEPTA_COM_lite LPS25HB_I2C HEPTA_SENSOR_lite HEPTA_EPS_lite
main.cpp
- Committer:
- heptasat2021
- Date:
- 2021-08-11
- Revision:
- 1:ddac5ec89167
- Parent:
- 0:da0f6aca15b8
- Child:
- 2:30f72f09756e
File content as of revision 1:ddac5ec89167:
#include "mbed.h" #include "HEPTA_CDH.h" HEPTA_CDH cdh(PB_5, PB_4, PB_3, PA_8, "sd"); Serial pc(USBTX,USBRX,9600); int main() { pc.printf("Hello World!\n"); mkdir("/sd/mydir", 0777); FILE *fp = fopen("/sd/mydir/sdtest.txt", "w"); if(fp == NULL) { error("Could not open file for write\r\n"); } fprintf(fp, "Hello my name is HEPTA\r\n"); fclose(fp); pc.printf("Goodbye World!\r\n"); }