- In the extension bar, click the AdBlock Plus icon
- Click the large blue toggle for this website
- Click refresh
- In the extension bar, click the AdBlock icon
- Under "Pause on this site" click "Always"
- In the extension bar, click on the Adguard icon
- Click on the large green toggle for this website
- In the extension bar, click on the Ad Remover icon
- Click "Disable on This Website"
- In the extension bar, click on the orange lion icon
- Click the toggle on the top right, shifting from "Up" to "Down"
- In the extension bar, click on the Ghostery icon
- Click the "Anti-Tracking" shield so it says "Off"
- Click the "Ad-Blocking" stop sign so it says "Off"
- Refresh the page
- In the extension bar, click on the uBlock Origin icon
- Click on the big, blue power button
- Refresh the page
- In the extension bar, click on the uBlock icon
- Click on the big, blue power button
- Refresh the page
- In the extension bar, click on the UltraBlock icon
- Check the "Disable UltraBlock" checkbox
- Please disable your Ad Blocker
- Disable any DNS blocking tools such as AdGuardDNS or NextDNS
- Disable any privacy or tracking protection extensions such as Firefox Enhanced Tracking Protection or DuckDuckGo Privacy.
If the prompt is still appearing, please disable any tools or services you are using that block internet ads (e.g. DNS Servers, tracking protection or privacy extensions).
Question
bobbygd
:cry:
I've tried several hours but could not hit my target.
My project is an interfacing program that can send and receive data from the com port. Now I can send data to the com port. Here is the code (It's very simple. You can go through it in few minutes.)
The design "Form1" contains 6 NumericUpDown components (X,Y,Z,yy,pp,rr) , 2 textboxes (TextBox1 and LogBook) and a button called "send".
My sending format is "X,Y,Z,yy,pp,rr" + "\n". Such a string is sent when the button is pressed. Also, it's presented in the textbox called "LogBook".
The program can send data of such format without any problem but when I add some codes (in bold letters shown below), I cannot manage to receive data from the serial port.
I've just modify the first program, adding several lines (the ones followed with "//add") to form the one shown above. My purpose is to put the data read from sp.ReadLine() into the "LogBook" textbox. (In this way, the "LogBook" textbox will contain both sent and received data.)
However, this program fails to work. I know the problem is that: in the static "Read method", LogBook.Text cannot be accessed. But I haven't come up with an idea to change this program so that it can receive data and present them in the "LogBook" textbox.
How should I attain my goal base on the first program? I mean how should I add codes to it.
Is there anyone that can help me? Take your time. I'm really worry about it. The deadline of the project is approaching.
Thank you very much!!
Link to comment
https://www.neowin.net/forum/topic/485716-chow-can-i-receive-data-through-serial-port/Share on other sites
5 answers to this question
Recommended Posts