The PictureBox should be named picTherm and be 100 by 600 pixels in size."
"The buttons are called btnConnect and btnDisconnect."
"You need the following Imports at the top of the code window,"
"Now you need to click on the PictureBox, look for the events list in the Properties window and find the Paint event. Double click the space next to it. This should bring up some headers for our event handler which will be used to draw our thermometer."
"You can test the program at this stage. It should display the value of the temperature that was hard-coded in the global variable declaration. If you change this value and run the program again, the reading on the scale should change."
"Add the following to the list of global variables,"
"Now go to the properties for the Disconnect button and set the visible property to false."
"Double click on the Connect button and write the event handler for it. You will need to change the COM port so that it matches the one your Arduino connects on."
"Double click on the disconnect button and write the event handler for it,"
"We also need to make sure that a disconnection is made before the program is closed. Go to the properties window for the form. Click on the lightning symbol to find the list of events. Double click in the box next to Form_Closing and add the following code,"
"Finally, we can add the code we need to read the value from the serial port and display it in our PictureBox,"
"You will need the following global variables,"
The PictureBox should be named picTherm and be 100 by 600 pixels in size."
"The buttons are called btnConnect and btnDisconnect."
"You need the following Imports at the top of the code window,"
"Now you need to click on the PictureBox, look for the events list in the Properties window and find the Paint event. Double click the space next to it. This should bring up some headers for our event handler which will be used to draw our thermometer."
"You can test the program at this stage. It should display the value of the temperature that was hard-coded in the global variable declaration. If you change this value and run the program again, the reading on the scale should change."
"Add the following to the list of global variables,"
"Now go to the properties for the Disconnect button and set the visible property to false."
"Double click on the Connect button and write the event handler for it. You will need to change the COM port so that it matches the one your Arduino connects on."
"Double click on the disconnect button and write the event handler for it,"
"We also need to make sure that a disconnection is made before the program is closed. Go to the properties window for the form. Click on the lightning symbol to find the list of events. Double click in the box next to Form_Closing and add the following code,"
"Finally, we can add the code we need to read the value from the serial port and display it in our PictureBox,"
"You will need the following global variables,"
การแปล กรุณารอสักครู่..