| Ligne 74 : |
Ligne 74 : |
| | <nowiki>void loop(void) | | <nowiki>void loop(void) |
| | { | | { |
| − | /* Get a new sensor event */ | + | /* Obtenir un nouvel événement senseur 'event' */ |
| | sensors_event_t event; | | sensors_event_t event; |
| | bmp.getEvent(&event); | | bmp.getEvent(&event); |
| | | | |
| − | /* Display the results (barometric pressure is measure in hPa) */ | + | /* Afficher les résultats (la pression barometrique est mesurée en hPa) */ |
| | if (event.pressure) | | if (event.pressure) |
| | { | | { |
| − | /* Display atmospheric pressue in hPa */ | + | /* Afficher la pression atmosphérique en hPa */ |
| − | Serial.print("Pressure: "); | + | Serial.print("Pression: "); |
| | Serial.print(event.pressure); | | Serial.print(event.pressure); |
| | Serial.println(" hPa"); | | Serial.println(" hPa"); |
| | | | |
| − | /* Calculating altitude with reasonable accuracy requires pressure * | + | /* Calculer l'altitude avec une précision raisonnable nécessite de connaître * |
| − | * sea level pressure for your position at the moment the data is * | + | * la pression au niveau de la mer pour votre adresse au moment ou les données * |
| − | * converted, as well as the ambient temperature in degress * | + | * sont convertie, ainsi que la température ambiante en degré Celcius. * |
| − | * celcius. If you don't have these values, a 'generic' value of * | + | * Si vous n'avez ces valeurs, vous pouvez utiliser la valeur générique de * |
| − | * 1013.25 hPa can be used (defined as SENSORS_PRESSURE_SEALEVELHPA * | + | * 1013.25 hPa (défine sous SENSORS_PRESSURE_SEALEVELHPA dans sensors.h) mais * |
| − | * in sensors.h), but this isn't ideal and will give variable * | + | * cela n'est pas idéal et peut fournir un résultat variable d'un jour à * |
| − | * results from one day to the next. * | + | * l'autre. * |
| − | * * | + | * * |
| − | * You can usually find the current SLP value by looking at weather * | + | * Vous pouvez trouvez trouver la valeur de Pression Atmosphérique au niveau * |
| − | * websites or from environmental information centers near any major * | + | * de la mer en consultant les sites météo de votre région ou centre d'inform- * |
| − | * airport. * | + | * ation environnemental près des aéroports principaux. * |
| − | * * | + | * * |
| − | * For example, for Paris, France you can check the current mean * | + | * Par exemple, pour Paris (France) vous pouvez trouver la pression moyenne * |
| − | * pressure and sea level at: http://bit.ly/16Au8ol */ | + | * au niveau de la mer sur: http://bit.ly/16Au8ol */ |
| | | | |
| − | /* First we get the current temperature from the BMP085 */ | + | /* Commençons par obtenir la température actuelle depuis le BMP085 */ |
| | float temperature; | | float temperature; |
| | bmp.getTemperature(&temperature); | | bmp.getTemperature(&temperature); |