Hallo Leute,
ich habe folgendes Problem: _Commlistports gibt bei mir immer 0 aus, dabei habe ich aber meinen Arduino am Rechner hängen. Daten an den Arduino senden funktioniert dann natürlich auch nicht, obwohl ich weiß, dass er an Port 3 hängt. Ich habe mal eine Schleife gemacht und ihn dann an Port 1 - 30 senden lassen, nichts kam an. Liegt es vielleicht daran, dass ich ein 64bit-Betriebsystem nutze?
Danke im Vorraus, Lutan
Mein Code:
C
;Include the Serial UDF
#include 'CommMG.au3'
$i=9
$i=$i+1
;Internal for the Serial UDF
Global $sportSetError = ''
;COM Vars
Global $CMPort = 3 ; Port
Global $CmBoBaud = 9600 ; Baud
Global $CmboDataBits = 8 ; Data Bits
Global $CmBoParity = "none" ; Parity
Global $CmBoStop = 1 ; Stop
Global $setflow = 2 ; Flow
Global $iWait = 0
;Start up communication with the Arduino
_CommSetPort($CMPort, $sportSetError, $CmBoBaud, $CmboDataBits, $CmBoParity, $CmBoStop, $setflow)
$data = 1
_CommSendString ($data, $iWait)
_CommSendByte(49)
MsgBox(0,"",_CommListPorts)
Alles anzeigen
Das ist einer der Codes die ich ausprobiert habe. Den hier habe ich schon aufs Minimum gekürzt, nie kam etwas an bei meinem Arduino. Dabei habe ich den hier aus einem Tutorial zu genau dem Thema, und den positiven Kommentaren zufolge hat der bei einigen funktioniert.