A
akoolz
Guest
Hello,<u1></u1><o></o>
I'm developing a c++ application that interfaces with an external MCU using a serial connection. I'm not very proficient with Visual Studio, so I looked up and followed the guide "Serial Port Programming using Win32 API" on xanthium to set up a Win32 API that took care of this.<o></o>
Included in the guide are c files to write and read to/from serial. Using this code, I am able to read/write values to my serial connection. However, I want to expand my application to have a proper user interface that controls when to send/receive data. Using the guide "Walkthrough: Create a traditional Windows Desktop application (C++)", I was able to create a simple interface.<o></o>
The simple interface includes 4 check boxes labelled test1-test4 and a big BEGIN button. The idea is that the user selects the tests they want to run and hits BEGIN. The app then sends a code over the serial connection referencing the test to be ran, which would be received by the MCU. The MCU would then run that test and return a value indicating if it passed or failed, and repeat for each test to be ran.<o></o>
What I can't figure out is how to link the two applications together. What I've tried doing is adding the code that runs the win32 api as a function within my windows desktop application c file. This function gets called once the BEGIN button is pressed, however the win32 api never opens, and nothing happens on the serial port.<u1></u1><o></o>
Is it possible to link the two apps together in a way that once I hit begin, the win32 api opens and sends the code, receives a code back, then relays this information back to the UI app? Or can I take care of the serial communications through my desktop app in a way similar to what I listed above?<u1></u1><o></o>
I'm not looking for a solution, I just want to know if what I'm trying to do is possible, or if there is a better way for me to do this. Sorry if my post is confusing, I tried including pictures of my current UI and links to the guides I followed, however I'm not verified so it wouldn't let me post it. If something I've written doesn't make sense, let me know.<u1></u1><o></o>
Thank you!<u1></u1><o></o>
<u1></u1>
Continue reading...
I'm developing a c++ application that interfaces with an external MCU using a serial connection. I'm not very proficient with Visual Studio, so I looked up and followed the guide "Serial Port Programming using Win32 API" on xanthium to set up a Win32 API that took care of this.<o></o>
Included in the guide are c files to write and read to/from serial. Using this code, I am able to read/write values to my serial connection. However, I want to expand my application to have a proper user interface that controls when to send/receive data. Using the guide "Walkthrough: Create a traditional Windows Desktop application (C++)", I was able to create a simple interface.<o></o>
The simple interface includes 4 check boxes labelled test1-test4 and a big BEGIN button. The idea is that the user selects the tests they want to run and hits BEGIN. The app then sends a code over the serial connection referencing the test to be ran, which would be received by the MCU. The MCU would then run that test and return a value indicating if it passed or failed, and repeat for each test to be ran.<o></o>
What I can't figure out is how to link the two applications together. What I've tried doing is adding the code that runs the win32 api as a function within my windows desktop application c file. This function gets called once the BEGIN button is pressed, however the win32 api never opens, and nothing happens on the serial port.<u1></u1><o></o>
Is it possible to link the two apps together in a way that once I hit begin, the win32 api opens and sends the code, receives a code back, then relays this information back to the UI app? Or can I take care of the serial communications through my desktop app in a way similar to what I listed above?<u1></u1><o></o>
I'm not looking for a solution, I just want to know if what I'm trying to do is possible, or if there is a better way for me to do this. Sorry if my post is confusing, I tried including pictures of my current UI and links to the guides I followed, however I'm not verified so it wouldn't let me post it. If something I've written doesn't make sense, let me know.<u1></u1><o></o>
Thank you!<u1></u1><o></o>
<u1></u1>
Continue reading...