Update and translate (fr->en) some comments

This commit is contained in:
Pierrick C 2018-07-29 16:25:37 +02:00
parent b8586837c3
commit 8f73b1f864

View File

@ -1,7 +1,7 @@
# Weather and GPS logger # Weather and GPS logger
########## ##########
# Config # # config #
########## ##########
print_data = True print_data = True
data_to_neopixel = True data_to_neopixel = True
@ -72,8 +72,8 @@ class Data:
self.data['GPS'] = None self.data['GPS'] = None
def show(self): def show(self):
"""Serialize data to json-formatted string for """Serialize data to json-formatted string for visualization on
visualization on serial console serial console
""" """
for source in self.data.keys(): for source in self.data.keys():
print(source + ": ") print(source + ": ")
@ -113,10 +113,10 @@ def check_data_dir():
os.mkdir('data/daily') os.mkdir('data/daily')
def update_neopixel(data): def update_neopixel(data):
"""Conversion des données en couleur pour affichage sur NeoPixel """Convert atmospheric data from BME280 sensor into NeoPixel color
* ROUGE => temp?rature : max = 35?C, min =10?C soit une amplitude de 25?C * RED => temperature : max = 35degC, min =10degC (range 25°C)
* BLEU => humidit? : max= 100%, mini=0% * BLUE => humidity : max= 100%, mini=0%
* VERT => Pression : mini=960hPa, maxi = 1030hPa soit une amplitude 70hPa * GREEN => pression : mini=960hPa, maxi = 1030hPa (range 70hPa)
""" """
rouge = int((data['BME280']['temp']['val']-10)*255/25) rouge = int((data['BME280']['temp']['val']-10)*255/25)
@ -152,8 +152,8 @@ clock.datetime = time.struct_time((2018, 7, 29, 15, 31, 30, 0, 0, 0))
# BME280 sensors (I2C) # BME280 sensors (I2C)
i2c = I2C(board.SCL, board.SDA) i2c = I2C(board.SCL, board.SDA)
# i2c addresses for BME280 breakout : # i2c addresses for BME280 breakout :
# 0x77 = adafruit board # 0x77 = adafruit breakout board
# 0x76 = chinese board # 0x76 = tiny chinese board
bme280 = Adafruit_BME280_I2C(i2c, address=0x76) bme280 = Adafruit_BME280_I2C(i2c, address=0x76)
# Battery voltage # Battery voltage