Hallo hier mein Testcode $regfile = "m328pdef.dat" $crystal = 16000000 $baud = 38400 Config 1wire = Portb.0 Dim Sensorid(8) As Byte Dim I As Byte Wait 7 Print Print "Start" 1wreset Portb , 0 Waitms 500 Sensorid(1) = 1wsearchfirst(portb , 0) For I = 1 To 8 'print the number Print Hex(sensorid(i)); Next Print Sensorid(1) = 1wsearchnext(portb , 0) For I = 1 To 8 'print the number Print Hex(sensorid(i)); Next Print Sensorid(1) = 1wsearchnext(portb , 0) For I = 1 To 8 'print the number Print Hex(sensorid(i)); Next Print Do nop Loop End Ich habe es mit einem und 2 sensoren probiert. Was ich komisch finde ist das die Ausgabe immer so aussieht Start 0000000000000000 0000000000000080 0000000000000040 Ich frage mich ob ich irgendwas falsch mache? Angeschlossen hab ich das ganze an den 5V ausgang vom Arduino Nano (Power over USB), GND und Port Pin. Hab auch schon 2 verschiedene Ports versucht. Immer mit gleichem Ergebniss
Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.