TP Info Indus Polytech paris sud Exemple de programme de base
Dependencies: FileSystem_POPS m3pi mbed
main3.cpp
00001 00002 #include "mbed.h" 00003 #include "m3pi.h" 00004 #include "MSCFileSystem.h" 00005 00006 m3pi m3pi; // Initialise the m3pi 00007 00008 Serial xbee(p28,p27); 00009 DigitalOut resetxbee(p26); 00010 Serial pc(USBTX, USBRX); // For debugging and pc messages, uses commented out to prevent hanging 00011 MSCFileSystem fs("fs"); 00012 00013 BusOut myleds(LED1, LED2, LED3, LED4); 00014 00015 int main() { 00016 resetxbee =0; 00017 wait(0.01); 00018 resetxbee =1; 00019 00020 FILE *p= fopen("/fs/tt.txt","a+"); 00021 m3pi.sensor_auto_calibrate(); 00022 wait(1.); 00023 00024 fprintf(p,"ecrire dans la cle USB\r\n"); 00025 fclose(p); 00026 00027 while(1) { 00028 00029 00030 } 00031 }
Generated on Tue Jul 12 2022 17:25:57 by 1.7.2