'---------------------------------------------------------------------------------------------------------------------------------------------------
'Hauptprogramm
'---------------------------------------------------------------------------------------------------------------------------------------------------
'---------------------------SD Anfang---------------------------------------------
$Include "Config_MMC.bas"
If Gbdriveerror = 0 Then
$Include "Config_AVR-DOS.BAS"
Btemp1 = Initfilesystem(1)
If Btemp1 <> 0 Then
Lcd_string = "Error on Filesystem " : Lx1 = 1 : Ly1 = 50 : Fontsize = 1 : Lcd_fcolor = Schwarz : Lcd_bcolor = Weiss
Gosub Lcd_print
Else
Open "Daten.txt" For Append As #10
Do
Voutxw = Getadc(0)
Waitms 10
Voutx = Voutxw / 1024
Voutx = Voutx * Referenzspannung
Voutxstr = Fusing(voutx , "#.####")
Lcd_string = "Voutx " : Lx1 = 2 : Ly1 = 50 : Fontsize = 1 : Lcd_fcolor = Rot : Lcd_bcolor = Weiss
Gosub Lcd_print
Lcd_string = Voutxstr : Lx1 = 8 : Ly1 = 50 : Fontsize = 1 : Lcd_fcolor = Rot : Lcd_bcolor = Weiss
Gosub Lcd_print
Loop
Close #10
'Datei auf SD Karte schließen
End If
Else
Lcd_string = "Driveerror " : Lx1 = 1 : Ly1 = 50 : Fontsize = 1 : Lcd_fcolor = Schwarz : Lcd_bcolor = Weiss
Gosub Lcd_print
End If
End
Lesezeichen