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 pc.putc('h') ; // dit au PC pas de carte capteur 00027 }
Generated on Mon Jul 18 2022 14:13:47 by
1.7.2