Hi, I have a little problem with serial link and Arduino Uno. I am trying to communicate by serial link with Flight Simulator, where I send a data about brakes to arduino (0,1) and simultaneously from arduino to simulator I send a string about state (brakes on/off). Here is part of my code:
if (strValue == '1')
{
Serial.write("Parking break is on");
digitalWrite(out1,HIGH);
strValue = 'z';
}
if (strValue == '0')
{
Serial.write("Parking break is off");
digitalWrite(out1,LOW);
strValue = 'z';
}
Problem is that LED is lighting up correctly, but string is not. When the brakes are on, my script in simulator writes out that are off and when is on, it writes off. I think that problem is somewhere in this code, but I don't know where. Could someone help me? Thank you in advance ![]()