Hot answers tagged

4

Basically *.ino is *.cpp without headers. So you can rename it to *.cpp, If you have any functions which are used before they have been defined, provide declarations for each function before its first use #include <Arduino.h> on the top #include <Wire.h> if you are using Wire and so on and you have "normal" CPP file. If you are making ...


3

The Arduino build preprocessing cannot locate the sensor source and header files if they are located in another sketch directory. The files needs to be moved to separate directory if shared (as a library). --Sketchbook ---NodeIntercom ----NodeIntercom.ino ---MasterNode ----MasterNode.ino ---libraries ----Sensor -----Sensor.h -----Sensor.cpp The Sensor ...


2

If you are using linux, as I guess, you can look at this archwiki page. Even if is a wiki relative to archlinux OS some informations explained are LinuxOS independendent. For your needs, you can use screen command. Here is an example: remember to substitute the serial port with the one wich arduino is connected (usually /dev/ttyACM* or /dev/ttyUSB*) and to ...


2

There is nothing wrong with that class and its code (as far as I can tell) - it compiles perfectly fine. What is probably wrong is that the IDE isn't picking up the code and compiling it in to your project. Is this class part of the sketch, or is it a separate library that you are writing? If the latter you have to ensure that the IDE knows about it, and ...


2

When you compile multiple files in the Arduno IDE the files first get concatenated together. It happens in alphabetical order, except the main INO file (the one named the same as the folder it's in) is placed first. In C the order in which things appear in the file matters. Basically you have to make sure that things (like variables, functions, etc) are ...


2

I got a hack to work (macOS) by symlinking the files to where ino expected them to be. But now I'm running into this issue: https://github.com/amperka/ino/issues/149 FWIW: cd /Applications/Arduino.app/Contents/Resources; ln -s Java ../Java; cd /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino; ln -s boards.txt avr/boards.txt; Did it for ...


2

After looking at the source repo it looks like quotes are now required: type = "wiring";


1

One possible approach is to guard the body of that sketch with an #ifdef ... #endif pair, and use Visual Micro's “Project Properties” to define (or not) a preprocessor symbol. [If the .ino or .pde in question is used as a #include file, you would instead guard all the #include instances.] Refer to the “Project Defines” page at visualmicro.com for how to ...


1

As you have found, Visual Micro will not consider the project to be an Arduino project if you do not have a "project_name.ino" included in the project A cheat is to create a "project_name.cpp" and include it in the project. This will cause the .ino to be ignored during compilation. EDIT: The project_name.cpp takes priority during compile, therefore the ....


1

Make a new tab in the IDE (top RH corner) with a xxx.cpp file name. Put your code in that. Leave the .ino file blank. Then it will compile. You need to add: #include <Arduino.h> ... to the start of the .cpp file. More information: How to avoid the quirks of the IDE sketch file pre-preprocessing To clarify the question about libraries ... You do ...


Only top voted, non community-wiki answers of a minimum length are eligible