Questions tagged [build]
31 questions
-1
votes
1
answer
96
views
Arduino IDE not seeing Arduino library
Working on my first real Arduino project.
I opened my code in the Arduino IDE and hit build and I get errors "not declared in the scope" on every single call to the Arduino library. For ...
5
votes
1
answer
977
views
How can I have code in a project that won't compile for Arduino?
I want to test the algorithms in my code without needing to send it to an actual Arduino board. I figured I could lay out my project like:
project/
core.cpp # core algorithms
core.h ...
2
votes
1
answer
2k
views
How to rebuild Arduino core for ESP8266
I'm experimenting adding DHCP option 160 to dhcpserver.c in the Arduino core for ESP8266 and therefor need to rebuild the relevant parts.
I made an initial guess that I might be able to make the ...
0
votes
1
answer
2k
views
avr_g++ compiler error: expected primary-expression before '.' token (C code in .ino)
The compiler is complaining about a macro defined in mjson.h
Documents\Arduino\libraries\microjson/mjson.h:135:28: error: expected primary-expression before '.' token
#define STRUCTOBJECT(s, f) ....
1
vote
3
answers
6k
views
Reason for warning "avr:build doesn't define a 'build.board' preference" when build.board is explicitly set in boards.txt?
I am trying to set up a custom board under the Arduino IDE, but I can not figure out why I am getting the warning...
Warning: Board Move38:avr:build doesn't define a 'build.board' preference. Auto-...
2
votes
1
answer
74
views
What is the correct way to create large project files?
I am currently working on a 10x10 RGB LED screen (using Neopixels from Adafruit) and my project files are starting to get rather large.
I have several different devices used in this project:
The LED ...
0
votes
2
answers
693
views
Complex Arduino programs
Im working on a RGB LED matrix project (10 x 10 Neopixels) and I'm using classes to handle the different hardware components. Whats the best way to deal with multiple files in the project eg, I have a ...
2
votes
2
answers
5k
views
Undefined reference in Eclipse of .h and .cpp files
I'm trying to create a linked list for use on the Arduino, in the Eclipse IDE with the Arduino/Sloeber plugin. The linked list is written in a .h and .cpp file, and included locally in the project.
...
1
vote
1
answer
2k
views
How to programmatically upload an Arduino sketch generated by node.js (electron) or from browser?
We are trying to make an app that generates an Arduino sketch (.ino) using Google's Blockly and node.js, and uploads it to Arduino.
Even after searching a lot, I am unable to find how to build and ...
1
vote
1
answer
1k
views
Environment Variable to change build
Is there a way to get the build to see an environment variable so that all the files can be built differently with one Environment variable change. Such as
#ifdef UseFirstDir
#include <C:\...
1
vote
2
answers
592
views
Compiling sketch vi command line
Since I don't like the text editor of the Arduino IDE, I decided to write a python script that I can invoke from my text editor to compile and upload my source. I program the popular esp8266 chip. So ...
1
vote
1
answer
3k
views
writing and uploading sketch as cpp file
I want to use only *.cpp files and no *.ino anymore. I read a lot of stuff about how to upload c++ instead of arduino sketches. But still I was not able to find a step by step guide how to do it.
...
1
vote
1
answer
190
views
How to use same sketch on two different computers in two different directories
I have the same sketch one that I use at my desk and in the lab, but they are in different directories on the different computers. This means that I have to change the paths to the includes which I ...
2
votes
1
answer
565
views
Visibility of #define between sketch and library
I want to have a define from my sketch be picked up by a library.
Here is a similar question for references: Using #define and multiple classes
I have a CI server that compiles my arduino sketchs on ...
3
votes
2
answers
130
views
What would be the architecturally-right place to put custom -D defines?
What I am trying to accomplish is to include information about the state of my environment at build time in my code. For example, I may want the setup() code to print the git sha it was built against, ...
1
vote
1
answer
1k
views
See compiled assembly output (Visual Micro)
I'm curious about what some of my code is being compiled into, is there a way to have the compiler save the intermediate assembly files, ideally somewhere in the project folder? I read some forum ...
6
votes
2
answers
2k
views
Arduino command line vs. Arduino builder
I'm working on adding my Arduino to continuous integration and I came across two different possible ways of doing this, Arduino command line, and arduino-builder. Can someone explain why the arduino-...
6
votes
1
answer
715
views
Understanding global variables on Arduino
I am rewriting a set of LED manipulation functions to be more object oriented, and I have found that, mysteriously, my global variable memory space has been over consumed, despite a reduction of the ...
0
votes
2
answers
2k
views
Visual Micro without .ino files
I am using the visual micro extension for Visual Studio 2015. I would like to not use any .ino files since I'm trying to setup cppcheck which doesn't recogonize .cpp files, and its just what I'm used ...
2
votes
0
answers
170
views
Arduino IDE Visual Studio and compile problems blank project .ino hack
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 ...
1
vote
1
answer
136
views
Alternative to patching core library source and header files
I am following a DIY guide that requires me to patch two arduino core library files: HID.cpp and USBAPI.h. This is not really practical for many reasons. I am not a native C programmer, but I am sure ...
2
votes
3
answers
180
views
What kind of Arduino should I pick for a calculator?
I am planning to build a calculator using Arduino as the base. I already know C and I love low-level stuff, so I guess the software part won't be a problem.
However, I've been stuck with Arduino. ...
1
vote
1
answer
418
views
Good way to get automatically generated code into a sketch
Situation:
Mac OS, Arduino IDE 1.5.6r2
I've got a sketch with several files, all classic .cpp and .h source and header files except the main sketch file. As the project goes more complex I started ...
0
votes
1
answer
228
views
Compiling includes with Ino
I'm attempting to compile this simple bounce.ino example with the ino tool, but it's giving me the error:
Bounce2.h: No such file or directory
I've placed it in the same directory as bounce.ino. Why ...
5
votes
1
answer
906
views
Cannot compile C++11 code via Makefile
I am building my Arduino project with a makefile:
BOARD_TAG = uno
ARDUINO_PORT = /dev/ttyACM0
USER_LIB_PATH = /home/prakhar/dev/alfred/arduino/libraries
CPPFLAGS=-x c++ -std=c++11 -Wall -...
3
votes
1
answer
288
views
How does Arduino IDE for mac deal with functions in other files
I'm a longtime C programmer. I've also done a little C++, a little Java, and a LOT of Objective-C, but am fairly new to the Arduino platform and it's IDE.
So far all my sketches have had a single ...
2
votes
0
answers
176
views
Adding an Arduino variant into ~/sketchbook and using it from a Makefile
I have a pins_arduino.h file for a given Arduino variant, installed in ~/sketchbook/hardware/attiny/variants/tiny14/pins_arduino.h. The IDE has no problem picking it up if I set the right board type. ...
8
votes
3
answers
7k
views
Are there any products based on Arduino that are sold by companies?
Ok, Arduino is a good technology but is it used professionally? Is the quality good enough to be used for professional purposes?
8
votes
1
answer
298
views
Is there a way to detect if Arduino, Stino or another IDE/toolchain is in use?
I've noticed some irritating differences between the Arduino IDE and Stino (mainly around including certain header files). These are likely bugs that need following up with one or both of the parties, ...
6
votes
2
answers
1k
views
How can I adapt the DallasTemperature library to accept another 1-Wire class?
A commonly used library is the DallasTemperature library, used to access DS18B20 sensors on a 1-Wire bus. When creating a DallasTemperature object you pass a reference to a OneWire object. OneWire can ...
6
votes
1
answer
2k
views
Why do I need to include libraries used in other libraries?
I have a simple library which uses another library.
Here is the header:
#ifndef __DERIVEDCLASS_H__
#define __DERIVEDCLASS_H__
#include <HardwareSerial.h>
class DerivedClass
{
private:
...