import time
import csv
import board
import busio
import adafruit_ads1x15.ads1015 as ADS
from adafruit_ads1x15.analog_in import AnalogIn

# Vytvoreni zapisu I2C
i2c = busio.I2C(board.SCL, board.SDA)

# Vytvoreni objekt ADC pomoci sbernice I2C
ads = ADS.ADS1015(i2c)

# Vystup z kanalu A0
chan = AnalogIn(ads, ADS.P0)

