Imports Emant
Module Module1

    Sub Main()
        Dim i As Integer
        Dim volt, lux As Double

        Dim luxarray(10) As Double
        Dim s As Stat = New Stat

        Dim DAQ As Emant300 = New Emant300
        DAQ.Open()
        For i = 0 To 9
            volt = DAQ.ReadAnalog(Emant300.AIN.AIN0, Emant300.AIN.COM)
            lux = 1333 * volt
            Console.WriteLine(lux)
            luxarray(i) = lux
            DAQ.Delay(1000)
        Next
        Console.WriteLine("Max = {0}", s.Max(luxarray))
        Console.WriteLine("Min = {0}", s.Min(luxarray))
        Console.WriteLine("Ave = {0}", s.Average(luxarray))
        DAQ.Close()
    End Sub

End Module
