Hello I have a basic Python code that sents arduino over Serial Port
serialport = 'COM4'
ser = serial.Serial(serialport, 9600, timeout=1)
sCounter = 0
while sCounter <= 5:
ser.write(contentElements[1])
print sCounter
time.sleep(0.5)
sCounter = sCounter + 1
ser.close()
And the Arduino Code is
nt ledPin = 13;
void setup() {
pinMode(ledPin, OUTPUT);
Serial.begin(9600);
}
void loop(){
if (Serial.available()) {
int serData = Serial.read();
Serial.println(serData);
digitalWrite(ledPin, HIGH);
delay(100);
digitalWrite(ledPin,LOW);
}
}
I just finished the python part and starting on the Arduino side, the data I am sending from Python is as fallows:
['2009.04.27', '12:55:14', '37.0408', '27.9242', 'CENTER']
An Array of some date time data, coordinates and some text
Now I can send the data succesfully but I can not check what am I receiving from the Arduino side because whenever I try to open the Serial Panel of Arduino Interaface it says "Serial Port is in Use" which is normal.
Is there a way that I can fallow the data I am receiving from Python to Arduino ? I really need this.
Thanks for help.