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.
sousprog.h
00001 00002 // sous programmes de gestion technique de la carte micro 00003 00004 void interrupt()// à chaque carractère reçut, ce programme est activé 00005 { // 00006 recpt = pc.getc(); 00007 if ( recpt == 'l') LED = 1 ; //allumer LED 00008 if ( recpt == 'k') LED = 0 ; //eteindre LED 00009 00010 // augmenter ou baisser Vr ( compensation en température) 00011 if ( recpt == 'r') {Vr = Vr - 0.02 ; if ( Vr < 0.05) Vr = 0.06;outVr.write(Vr) ; } //-- 00012 if ( recpt == 'm') {Vr = Vr - 0.001 ; if ( Vr < 0.05) Vr = 0.06;outVr.write(Vr) ; } // - 00013 if ( recpt == 's') Vr = 0.3681 ; //vK remis à 20°C (environ ) 00014 if ( recpt == 'p') {Vr = Vr + 0.001 ; if ( Vr > 0.95) Vr = 0.94;outVr.write(Vr) ; } // + 00015 if ( recpt == 'q') {Vr = Vr + 0.02 ; if ( Vr > 0.95) Vr = 0.94;outVr.write(Vr) ; } // ++ 00016 return; // fin du sous programme 00017 } 00018 00019 void init(void) // initialisations hard 00020 { 00021 pc.baud(115200); // vitesse liaison série 00022 pc.attach(&interrupt, Serial::RxIrq); // autorise IT de liaison serie 00023 plus = 1; // polarisation de la résistance de l'inter carte 00024 LED = 0 ; // led carte off 00025 outVr.write(Vr); // sortie de outVr sur la broche vK 00026 //etape=0; 00027 pc.putc('h') ; // dit au PC pas de carte capteur 00028 pc.putc('d') ; 00029 } 00030 00031 void calibrationT() 00032 { 00033 Vr = 0; 00034 outVr.write(Vr); 00035 Vs = 0; 00036 while(Vs <= 0.57) 00037 { 00038 Vr = Vr + 0.001; 00039 outVr.write(Vr); 00040 wait(0.01); 00041 Vs = inVs.read(); 00042 } 00043 pc.putc('c'); 00044 } 00045 00046 void calibrationF() 00047 { 00048 Vr = 0.66; 00049 outVr.write(Vr); 00050 00051 wait(0.01); 00052 Vs = inVs.read(); 00053 pc.putc('c'); 00054 } 00055 00056 void calibrationL() 00057 { 00058 pc.putc('c'); 00059 }
Generated on Sat Jun 17 2023 03:53:57 by
1.7.2