Go Down

Topic: Can't store the values I get from my temperature in the database. (Read 2393 times) previous topic - next topic


I overlooked this part:

This exception only appears when I have the arduino software running and getting the temperature values. When it's not running, nothing happens, and the buttons don't work. here is the code of my WFApplication.

To OP: you can't have two applications open the same com port at the same time. If you have the Arduino IDE running and serial monitor open, COM4 (or whatever it is) is locked. You have to close the serial monitor or probably quit the entire Arduino IDE before your C# app can open COM4.

This will make the "port locked" error go away.

If the program doesn't work, keeping the Arduino IDE open is not the solution.


Code: [Select]
private void timer1_Tick(object sender, EventArgs e)
            string POT = sp1.ReadExisting();
            label1.Text = POT;

I usually code in vb.net, but... I don't see where you initialize and start timer1, not where you associate timer1_Tick method with the timer1 tick event...

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131