so jetzt hab eich es fast dank BlueNatur.
hier der Code:
Code:
$regfile = "m8def.dat"
$crystal = 1000000
$baud = 9600
Config Adc = Single , Prescaler = Auto , Reference = Internal
Config Portc = &B11111111
Config Portb = &B00000010
Dim A As Word
Dim I As Integer
Dim N As Integer
Dim Ton As Integer
Start Adc
Do
A = Getadc(0)
If A < 128 Then
Portb.1 = 0
Else
Portb.1 = 1
End If
Loop
End
nun eine frage noch der kennt jetzt dunkel und hell wenn es hell wird geht die lampe auch an, jedoch sollte das umgekehrt sein.
wie mache ich das jetzt habe an der Formel ob schon alles mögliche probiert, aber es klappt nicht. Könnte mir bitte noch jemand helfen??
wäre sehr nett wenn das heute noch ging.
gruß
patrick[/u][/code]
Lesezeichen