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
Hot Topic (More than 8 Replies) VS Community 2015/Arduino (Read 5651 times)
Ericnickel
Newbies
*
Offline


Posts: 5
Joined: Oct 10th, 2016
VS Community 2015/Arduino
Oct 10th, 2016 at 2:06am
Print Post  
I've been searching for a solution for three days but I'm about to give up.  I've just installed VS for use with creating Arduino sketches but all the Toolbox items are greyed out.

I'm using Windows 10.
What am i missing?

Thanks
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VS Community 2015/Arduino
Reply #1 - Oct 10th, 2016 at 12:43pm
Print Post  
Hi,

"Toolbox" is a confusing word so please show a screen image of the problem

Thanks
  
Back to top
IP Logged
 
Ericnickel
Newbies
*
Offline


Posts: 5
Joined: Oct 10th, 2016
Re: VS Community 2015/Arduino
Reply #2 - Oct 10th, 2016 at 1:15pm
Print Post  
I am unfortunately not in front of my PC but the toolbox I refer to is the menu on the far left of the vs window that allows me to place buttons etc into my sketch. I'll grab a screen shot tonight. 

Thanks
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VS Community 2015/Arduino
Reply #3 - Oct 10th, 2016 at 1:21pm
Print Post  
Maybe some confusion. A sketch can not have buttons so you should close the toolbox.

Arduino projects are C++ and the toolbox is for windows programs.

To program your arduino please connect the usb cable or programmer and then follow the First Steps in the documentation

Normally we also recommend that users who are new to Arduino should first spend a few hours using the Arduino IDE so that Arduino is understood before using Visual Studio.

Thanks
  
Back to top
IP Logged
 
Ericnickel
Newbies
*
Offline


Posts: 5
Joined: Oct 10th, 2016
Re: VS Community 2015/Arduino
Reply #4 - Oct 10th, 2016 at 5:54pm
Print Post  
I'm trying to create a program in vs that allows me to control an Arduino led with 'buttons' on my computer screen.   

http://georgehk.blogspot.com/2014/05/turn-onoff-led-in-arduino-using-visual.html...
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VS Community 2015/Arduino
Reply #5 - Oct 10th, 2016 at 5:57pm
Print Post  
For the windows app you should create a new c# windows forms project and then the tool box will be available.

You then follow the visual micro guide to create and upload an Arduino program that responds to the requests made by the windows forms program.

So you will have two programs/projects 1) one for windows and 2) for arduino

The example shows the arduino code as follows and does not and can not use any visual studio toolbox controls

Code
Select All
#define BaudRate 9600
#define LEDPin    10
char incomingOption;

void setup()
{
  pinMode(LEDPin, OUTPUT);
  // serial communication
  Serial.begin(BaudRate);
}
void loop()
{
     //read from serial port getting information from VS 2013
     incomingOption = Serial.read();
     //verify incomingOption
     switch(incomingOption){
        case '1':
          // Turn ON LED
          digitalWrite(LEDPin, HIGH);
          break;
        case '0':
          // Turn OFF LED
          digitalWrite(LEDPin, LOW);
          break;
     }
} 



  
Back to top
IP Logged
 
Ericnickel
Newbies
*
Offline


Posts: 5
Joined: Oct 10th, 2016
Re: VS Community 2015/Arduino
Reply #6 - Oct 10th, 2016 at 9:32pm
Print Post  
That is the problem I'm having. I started a new Arduino project and when I open the vs toolbox to add buttons to control the LEDs all of the toolbox components are greyed out. 

Yes I realize the Arduino code has no effect within the vs environment.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VS Community 2015/Arduino
Reply #7 - Oct 10th, 2016 at 9:50pm
Print Post  
As I said you need two projects. So far you have only created an arduino project so you won't have any toolbox items.

Use File>new>project to create a standard visual studio c# windows forms project. Then you will have a project that contains a "Form" and you will be able to drag drop the toolbox items onto it.

When you have a windows form project you can click build and it will create a normal windows .exe program that can be run on windows with the form hat you have created.

The arduino program can be built seperately and then uploaded to the arduino using the usb cable.

The example you posted uses the two programs. The program on the arduino and the program on windows communicate via usb. 

So to be clear. You can't create a windows form or use toolbox items for code that runs on an arduino. Instead you have to create two programs that speak to each other using Serial communications.

Whilst this is new to you you should have two instances of Visual Studio open. One that contains the windows project and one that contains the arduino project. 

It is possible to have both projects open in a single visual studio ide but it will be more confusing for you to work that way.
  
Back to top
IP Logged
 
Ericnickel
Newbies
*
Offline


Posts: 5
Joined: Oct 10th, 2016
Re: VS Community 2015/Arduino
Reply #8 - Oct 11th, 2016 at 1:10am
Print Post  
Ohhhh!  Now I understand. Thanks for your patience!!!  I look forward to sitting down and working on this.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint