Open-source weather station for astronomy
at main 345 B view raw
1import time 2from machine import Pin, I2C 3from mlx90640 import MLX90640, RefreshRate, init_float_array 4 5i2c = I2C(0, sda=Pin(22), scl=Pin(23), freq=400000) 6mlx = MLX90640(i2c) 7mlx.refresh_rate = RefreshRate.REFRESH_2_HZ 8frame = init_float_array(768) 9while True: 10 mlx.get_frame(frame) 11 mlx.get_frame(frame) 12 print(frame) 13 time.sleep(2)