diff --git a/circuitpython/main.py b/circuitpython/main.py index 43ac286..649ac10 100644 --- a/circuitpython/main.py +++ b/circuitpython/main.py @@ -1,7 +1,7 @@ # Weather and GPS logger ########## -# Config # +# config # ########## print_data = True data_to_neopixel = True @@ -72,8 +72,8 @@ class Data: self.data['GPS'] = None def show(self): - """Serialize data to json-formatted string for - visualization on serial console + """Serialize data to json-formatted string for visualization on + serial console """ for source in self.data.keys(): print(source + ": ") @@ -113,10 +113,10 @@ def check_data_dir(): os.mkdir('data/daily') def update_neopixel(data): - """Conversion des données en couleur pour affichage sur NeoPixel - * ROUGE => temp?rature : max = 35?C, min =10?C soit une amplitude de 25?C - * BLEU => humidit? : max= 100%, mini=0% - * VERT => Pression : mini=960hPa, maxi = 1030hPa soit une amplitude 70hPa + """Convert atmospheric data from BME280 sensor into NeoPixel color + * RED => temperature : max = 35degC, min =10degC (range 25°C) + * BLUE => humidity : max= 100%, mini=0% + * GREEN => pression : mini=960hPa, maxi = 1030hPa (range 70hPa) """ 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) i2c = I2C(board.SCL, board.SDA) # i2c addresses for BME280 breakout : -# 0x77 = adafruit board -# 0x76 = chinese board +# 0x77 = adafruit breakout board +# 0x76 = tiny chinese board bme280 = Adafruit_BME280_I2C(i2c, address=0x76) # Battery voltage