Es funzt

thx super ich freu mich richtig

Also hier eine muster lösung für RN control 1.4
Sharp Sensoren

nur mit entfernung messen hab ich ncoh nichts gemacht...
werden mir jetzt ein paar motoren kaufen und gucken wie ich das zum laufen bekomme..

ich schreibe auch eine Dokumentation dazu

also wer als mit helfer mit rein will bitte melden....
Diese Doco soll es jedem ermöglichen mit dem Rn board einen funktionfähigen roboter zu bauen...


Werde mir demnächst die Pwm anschauen also den link poste ich hier wer weite helfen will ab und zu mal hier rein sehen .....


Code:

$regfile = "m32def.dat"
$crystal = 16000000


Config Porta = Input
Config Portc = Output
Config Adc = Single , Prescaler = Auto
Dim A As Word

Enable Interrupts

Start Adc

Do
  '1 = aus
  '0 = an


A = Getadc(0)

If A > 65 Then Portc.7 = 1 Else Portc.7 = 0
If A > 140 Then Portc.6 = 1 Else Portc.6 = 0
If A > 180 Then Portc.5 = 1 Else Portc.5 = 0
If A > 220 Then Portc.4 = 1 Else Portc.4 = 0
If A > 270 Then Portc.3 = 1 Else Portc.3 = 0
If A > 350 Then Portc.2 = 1 Else Portc.2 = 0
If A > 400 Then Portc.1 = 1 Else Portc.1 = 0
If A > 532 Then Portc.0 = 1 Else Portc.0 = 0



Waitms 10
Loop
End