i have a temprature sensor (ntc) and humidistat that i have wired into the anolog inputs with resistors ect, of my k8055 and can get a reading, but the scales are reversed, when i heat the thermistor the temp reading goes down, same with the humidistat,
could you tell me why that is and how i can work around it,
the code i use is below
Private Sub Timer3_Tick_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer3.Tick
Dim data1 As Integer
Dim data2 As Integer
Dim degrees1 As String 'this variable hold the value in degrees centigrade A1
ReadAllAnalog(data1, data2) 'get the analog values (0..255) from the interface board
degrees1 = ((45 * data1 / 256) - 0) 'convert '0..255'-value to degrees
'101 : # of steps between -0 and +45°
'256 : 8-bit AD -> 256 values
'-0 : minimum temp. that can be measured
If (degrees1 - Int(degrees1)) <= 0.3 Then degrees1 = Int(degrees1) 'round degrees to 0, or 1
If (degrees1 - Int(degrees1)) > 0.3 And (degrees1 - Int(degrees1)) <= 0.7 Then degrees1 = Int(degrees1) + 0.5
If (degrees1 - Int(degrees1)) >= 0.7 Then degrees1 = Int(degrees1) + 1
If degrees1 = Int(degrees1) Then degrees1 = degrees1 & ",0" 'if there is no fraction, add a ".0"
Label10.Text = degrees1 'display the temperature
End Sub
i changed the values degrees1 = ((45 * data1 / 256) - 0) ’ 45 so it was the max and -0 so it was the min,