2

I'm new to Arduino and have little programming experience apart from my computer science degree. I used C++ for some projects in my degree but am barely proficient.

My first project is relatively complex process control for an Arduino beginner and I've quickly become frustrated with the Arduino IDE which seems to be a common problem. I've installed Visual Studio with the Visual Micro plugin (Win7) but I'm getting compile problems. I have successfully built a data logging sensor array both in Arduino IDE and Visual Studio in Win7, but as I'm trying to add complexity I'm experiencing difficulties.

I found this recommendation on Gammon Forum for use with the Arduino IDE to achieve a standard C++ build environment but it's not working in the visual studio environment.

Files contained in "EmptySketch" project folder:

"EmptySketch.ino"

//beginning EmptySketch.ino
//end EmptySketch.ino

"TestSketch.cpp"

//beginning TestSketch.cpp

#include <Arduino.h>

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  Serial.println("Hello");
  Serial.flush();
}

void loop() {
  // put your main code here, to run repeatedly:
}
//end TestSketch.cpp

When I create a project in Arduino IDE this compiles, uploads and runs with the expected output, but when I open EmptySketch.ino in VS it builds, uploads but gives no output.

Can anyone help me with this approach or should I simply upload my real project using a conventional .ino which won't compile and ask for help with that?

2
  • 1
    Firstly, please format your code correctly. Edit the question, highlight all code and press CTRL + K. Secondly, if you upload a blank sketch, what do you actually expect to happen? Nov 29, 2015 at 23:26
  • Maybe, instead of a complex first project, slowly work through the examples in the Arduino Cookbook, or some other such literature, in order to familiarise yourself with the code and coding environment. The Arduino IDE is an extremely simplified environment, but even so, it still takes some getting used to. However, I'm sure after a few examples you will be up and running... Dec 29, 2015 at 6:29

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.