Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Control and reading Arduino via Windows Form (Read 1206 times)
Don Faulks
Newbies
*
Offline


Posts: 1
Location: Minneapolis, MN
Joined: Feb 11th, 2013
Control and reading Arduino via Windows Form
Feb 18th, 2013 at 2:15am
Print Post  
Hello All, 
I am a new guy to windows programming as well as Arduino. I simply want to control a windows form control such as changing the color of a oval shape based on a Arduino pin. So pin 1 goes high, the control turns green. The pin goes low it turns red. 

I set the Arduino to output a comma delimited string of the pin levels "1,1,0,1,0,1" (level of each digital pin) to the serial port every 500mS. I can read the value and send it to a textbox as a string and it displays fine. I thought I could just split the string and assign each bit of the string to a variable and base the status of the windows control on that but I can't see how to do it in Visual Studio 2012. 

Any help would be great!
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Control and reading Arduino via Windows Form
Reply #1 - Feb 20th, 2013 at 7:40pm
Print Post  
Not sure if I fully understand the question.

I haven't seen how to automatically base the status of a control of some data, normally you would read the string, split it and then use strArray[n] to determine and set the status/color of a control. Alternatively save the strings[] as a class global and use a timer on the window to reflect the latest values every 250ms or something.
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Control and reading Arduino via Windows Form
Reply #2 - Sep 11th, 2014 at 3:28pm
Print Post  
This Topic was moved here from Project Guidance [move by] Visual Micro.
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint