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 How to create a new project? (Read 1013 times)
bk13
Junior Member
**
Offline


Posts: 20
Joined: Aug 23rd, 2020
How to create a new project?
Sep 7th, 2020 at 10:17pm
Print Post  
I need to back up some because I am not at all confident of where my solution is and how to get to a different source code.  I cannot get my code going so am backing up to a minimum project.  But, I cannot get there.
Here is the path where I want to keep all my source code for this Arduino project:
D:\ARDUINO\VISUAL_STUDIO
Located in that directory is this file:  ac_monitor.ino
That is the sketch to start with.
How do I get started with this file in this directory?
« Last Edit: Sep 9th, 2020 at 1:27am by Tim@Visual Micro »  
Back to top
 
IP Logged
 
bk13
Junior Member
**
Offline


Posts: 20
Joined: Aug 23rd, 2020
Re: Setup difficulties
Reply #1 - Sep 8th, 2020 at 12:36am
Print Post  
Here is an attempt at getting started:
Select vMicro -> Open Existing Arduino Project
Navigate to: D:\ARDUINO\VISUAL_STUDIO  to find this file:
"D:\ARDUINO\VISUAL_STUDIO\ac_monitor_min.ino"
Select it and click Open to get a dialog proclaiming:
Quote:

Unable to find a sketch called VISUAL_STUDIO in folder D:\ARDUINO\VISUAL_STUDIO  

That message looks completely wrong.  There is no sketch by that name, and should not be one. It’s a directory name, not a sketch name.  VS should open sketch that was selected when Open was clicked.
What might I do different?

When selecting VMicro -> New Arduino Project 
There is never an opportunity to select the directory.  I want all my work and projects on a drive other than C.

Attached is my minimum project, just flash the light.  I cannot get it to run.  That is a pretty good indicator that VS is not setup properly on this computer.   
Maybe: is there a way to export and capture a complete solution that might work?
« Last Edit: Sep 8th, 2020 at 1:06am by bk13 »  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
How to create a new project?
Reply #2 - Sep 9th, 2020 at 1:15am
Print Post  
Keep in mind that Arduino does not need the concept of a project. The way it knows that a "project" is an Arduino project is by the name of an .ino matching the name of the containing folder. In Visual Studio we exect the Visual Studio "project" name also be the same.

You would need a folder called "ac_monitor" containing a file called "ac_monitor.ino". The Arduino IDE will then also recognize the project.

Example of two different projects/sketches

D:\ARDUINO\VISUAL_STUDIO\ac_monitor\ac_monitor.ino
D:\ARDUINO\VISUAL_STUDIO\project2\project2.ino

Initially, the easiest solution is to use the Arduino IDE or visual Micro to create the new sketch for you. Then you can see what the IDE(s) have done. 

The "File>New>Arduino Project" menu uses the current "Arduino SketchBook" folder to create new projects, Same as the Arduino IDE. You can change the location but you would need to copy any libraries you have installed when doing that. Create a new thread to discuss that if you want to. The menu item is designed for people who are used to how the Arduino IDE works. 

There is a better options for you ....

If you use the Visual Studio "File>New>Project" wizard you will see that we provide "New Arduino Project" templates under the C++ section. Using the wiazard allows you to selected a folder as you can when you create any type of Visual Studio project. The default location the wizard prompts to save can be configured in the Visual Studio Tools>Options
« Last Edit: Sep 9th, 2020 at 1:27am by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
bk13
Junior Member
**
Offline


Posts: 20
Joined: Aug 23rd, 2020
Re: How to create a new project?
Reply #3 - Sep 9th, 2020 at 3:02pm
Print Post  
Tim, 
Thank you for your time.  I am going with your better option.  I am also doing what I should have done and going through all the settings one at a time and see where that gets me.
Thank you.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to create a new project?
Reply #4 - Sep 10th, 2020 at 4:04pm
Print Post  
Off-Topic replies have been moved to this Topic.
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint