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.
main.cpp
00001 #include "mbed.h" 00002 #include "MS5607I2C.h" 00003 CAN can1(p9, p10); 00004 00005 DigitalOut led1(LED1); 00006 CANMessage can_MsgRx; 00007 00008 int main() { 00009 00010 can1.frequency(1000000); //bus can 1Mbits/s 00011 MS5607I2C ms5607(p28, p27, false); // capteur 00012 ms5607.init(15.0,101325.); // initialiser capteur 00013 led1=1; 00014 // ms5607.printCoefficients(); 00015 can_MsgRx.id=0x1X0; // X compris entre 0 et 7 voir avec l'enseignant 00016 can_MsgRx.len=4; // trame à 4 octets 00017 while(1){ // boucle infinie 00018 printf("P= %5.0f Pa ", ms5607.getPressure()); 00019 printf("T= %2.2f ", ms5607.getTemperature()); 00020 printf("Alt= %.2f m\n", ms5607.getAltitude()); 00021 wait(1); 00022 } 00023 }
Generated on Fri Jul 29 2022 16:26:08 by
1.7.2