i am trying to connect with a temp sensor that use ASCII commands ... when i use arduino serial monitor to test commands the sensor respond well, but when i try to use C# i get different ressult.
Through arduino serial monitor (all great):
The command that i use: ?2T
The sensor Respond: !2T0501.3
where "!2T" is a response confirmation and "0501.3" is the actual temperature meassure.
But when i use C# (problem):
The command that i use: ?2T\r "because i need the carriage return"
The sensor Respond: i??X?Y?K5
i think that is a very basic format problem but i kind of new in C# and i don't know how to fix it.
What I have tried:
serialPort1.ReadTimeout = 500;
timer1.Interval = 1000;
timer1.Tick += new EventHandler(timer1_Tick);
timer1.Enabled = true;
private void timer1_Tick(object sender, EventArgs e)
textBox1.Text = serialPort1.ReadLine();
private void button1_Click(object sender, EventArgs e)