Hier die zuletzt von mir verwendete Routine:
Variablendeklarationen stehen teilweise in den Zeilen als BemerkungCode:Templesen: Dim Sc(9) As Byte Dim Dg As Integer Dim Tmp As Byte , T As Integer , T1 As Integer 1wreset 1wwrite &HCC 1wwrite &HBE Sc(1) = 1wread(9) Rom1 = 1wread(2) 'Dim Rom1 As Integer 1wreset If Sc(9) = Crc8(sc(1) , 8) Then Tmp = Sc(1) And 1 If Tmp = 1 Then Decr Sc(1) T = Makeint(sc(1) , Sc(2)) T = T * 50 T = T - 25 T1 = Sc(8) - Sc(7) T1 = T1 * 100 T1 = T1 / Sc(8) T = T + T1 Dg = T / 10 End If Temperatur = Dg 'Dim Temperatur As Integer Menu = Str(temperatur)' dim menu as string * 30 (kann auch weniger sein) If Temperatur >= 0 Then Stemperatur = Format(menu , " 000") 'Dim Stemperatur As String * 4 Else Stemperatur = Format(menu , "-000") End If Return







Zitieren
Lesezeichen