firstoption
Member
- Joined
- Apr 23, 2014
- Messages
- 10
- Programming Experience
- Beginner
Good day to all,
Please i need your support on how to modify the program below so that it can read the data(temperature value) sent from the microcontroller as long as the Checkbox is checked.At the moment the function
reads only the first temperature value sent from the microcontroller,the subsequent temperatue values are not being updated even though the Checkbox is still checked.I would be very glad if somebody could put me through on how to create a Loop as Long as the Checkbox is checked.Thank you for the usual Support.Best regards.
Please i need your support on how to modify the program below so that it can read the data(temperature value) sent from the microcontroller as long as the Checkbox is checked.At the moment the function
C#:
myFtdiDevice.Read(readData, numBytesToRead, ref numBytesRead);
C#:
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
UInt32 numBytesRead = 0;
UInt32 numBytesToRead = 1;
byte[] readData = new byte[10];
ftStatus = myFtdiDevice.Read(readData, numBytesToRead, ref numBytesRead);
label11.Text = Convert.ToString(readData[0]);
}