To compile is to convert the code for a sketch into machine readable files that are uploaded to the Arduino. This tag is mostly used for the space and footprint of the files uploaded to the Arduino.

learn more… | top users | synonyms

0
votes
1answer
41 views

Error compiling code (tv-b gone)

I have been getting started with the arduino and found a great project online called tv-b gone. It includes some code which I cannot compile. Yes I have included main.h and worldcodes.cpp. /* ...
0
votes
1answer
24 views

Arduino Yun doesn't link any library

I'm writing code for a project with Arduino Yun. My project is quite simple: it takes a picture with a webcam and saves it in a PNG or JPEG file format. I've already installed the uvc driver for ...
3
votes
1answer
153 views

Basic makefile for avr-gcc

I would like to make a makefile for compiling c programs for the arduino. I am somewhat familiar with make but have never used it with avr-gcc. What is the simplest way I could put the commands below ...
0
votes
2answers
32 views

Problem using ino build for 8 MHz

I want to use the Ino command line toolkit to build and upload my HEXes and it works well for the regular Arduino, however when I try to upload code to a Mini Pro 3.3V at 8 MHz the code has the timing ...
0
votes
1answer
55 views

This specific code just refuses to compile?

I've been working on some software to do REALLY basic composition of music. Here's my code so far: #include "notes_sharps.h" int notes[] = ...
-2
votes
1answer
133 views

nRF24L01+ Arduino mpu6050 [closed]

kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
0
votes
1answer
165 views

WebCam Face detection and tracking tutorial with Arduino Uno R3 and OpenCV 3.0 RC1 in Ubuntu 14.04

I try to make this Arduino Open CV tutorial for webcams. OpenCV 3.0 RC1 is compiled and installed. I also use Code::Blocks 13.12 as IDE. I am a newbie what comes to OpenCV and I do not know too much ...
0
votes
0answers
38 views

“variable must be const” fix for Arduino progrem

I am trying to upload to my nano the code attached. It is giving me an error saying variable must be const about something I am trying to put in progrem. I learned that installing a older version of ...
0
votes
0answers
55 views

Obfuscate .hex file

I've wrote a code for arduino mega, and want to force it from copying (this is commerce project). How can I obfuscate .hex file before uploading to arduino?
0
votes
1answer
79 views

How to compile and upload the specific (.cpp + .h) code?

I have a specific arduino code (no .ino files) https://github.com/justintconroy/MdbBillValidator , which can't be opened by arduino IDE. How can I make & upload this code? I have an arduino 2560 ...
0
votes
0answers
63 views

Problem in Uploading through Visual Studio

It's my simple program program. int led = 13; void setup() { pinMode(led, OUTPUT); /* add setup code here */ } void loop() { digitalWrite(led, HIGH); delay(1000); ...
1
vote
1answer
82 views

Bizarre compilation problem — only compiles with the addition of a single Serial.println() line?

I have a SwitchDoc Labs DS3231 Real Time Clock Module that I am using with an Arduino Mega. It's connected to 3.3V and the SDA(20)/SDL(21) pins. I'm also using SwitchDoc's RTC_SDL_DS3231_ARDUINO ...
2
votes
1answer
603 views

How to add hysteresis to threshold values?

This code compares the analog input value against two thresholds, having three voltage regions. Then it will turn on an LED according to what region the read voltage is in. The problem is that when ...
0
votes
1answer
45 views

How do you call a class method with named parameters?

I have a C++ class constructor like: Motors(int p1=0, int p2=0); However, when I attempt to instantiate it with named parameters like: Motors motors(p1=123, p2=456); the Arduino C/C++ compiler ...
1
vote
1answer
255 views

Build arduino with windows command line

Can someone explain, step by step, along with all software I must use for using Windows command prompt to build an Arduino sketch (.ino file )? I've followed these steps but I can't.
0
votes
0answers
340 views

Arduino Upgrading from 1.0.6 to 1.6, code doesn't work anymore

I'm using arduino UNO, and today I upgraded my IDE from 1.0.6 to 1.6, just to upgrade, nothing special. I got my libraries again but I got an error with a code that was working ok, the error was: ...
1
vote
1answer
78 views

How can I obtain the .hex of a file

I have an Arduino Yún running Openwrt-Yún 1.5.3 (which is the latest version, as I upgraded yesterday), and I am trying to obtain a .hex (compiled sketch), so that I can upload a sketch directly into ...
1
vote
1answer
174 views

error: 'CLASS' does not name a type only when creating object inside another object

I'm trying to use Adafruit's LED Backpack library within a custom class. When I use the Adafruit library directly within a sketch, it compiles fine. When I use an example sketch provided with the ...
0
votes
1answer
122 views

Why doesn't the Micro OLED library compile on my DUE?

I have an Arduino DUE and just got a Micro OLED display from SparkFun. Using their library, when I try to compile I get the error below. Other example code works just fine and I've programmed this ...
1
vote
3answers
139 views

Can i use arduino code, without using arduino board but just using MCU included

I am developing a product, and to ease my job i am planning to use MCU inside the arduino with the library of Arduino. Since all the registers are already defined inside the library, and all required ...
0
votes
3answers
995 views

Compiling is slow

Compilation of even the simplest program (like Blink) is extremely slow, the progress bar often hangs halfway for nearly half a minute. Is this normal? I understand that not all computers are ...
2
votes
2answers
78 views

Does the compiler generate intermediate assembler?

My source files are *.ino, but after compilation there aren't any other files placed in the folder. Does the compiler generate intermediate assembler, and if so, where does it leave them? Or is the ...
4
votes
1answer
278 views

Setting timer3 in CTC mode - conflict with servo library

I would like to set up a timer in order to call a function 800 times per second. I'm using the Arduino Mega and Timer3 with a prescaler of 1024. To choose the prescaler factor I've considered the ...
0
votes
1answer
248 views

0.96" OLED and Arduino UNO usage error

I have Arduino UNO with 0.96" OLED display with 128(width)*32(height). It is said that I have to edit Adafruit_SSD1306.h for my 128*32 OLED, okey I did it from 128*64 to 128*32 but I still get the ...
1
vote
1answer
63 views

Add -D option via boards.txt

I'm trying to find a way to set a -D compiler option from within the boards.txt file. Basically set a #define for use in code. There are already some special ones like board.vid but is there a generic ...
0
votes
3answers
86 views

Simple compiler design help: Variable length arrays in Arduino?

I'm trying to write a simple compiler in the Arduino language that I am making up for my lab. The compiler will have to be able to turn a string like this: "do command_one 3 times" into a data ...
3
votes
1answer
193 views

Cannot compile C++ 11 code on Arch

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
1answer
4k views

Arduino IDE #ifdef

I use my Arduino IDE to either upload my sketch to a Arduino or ATTiny or ATmega328. As you know each device can have a different pinout. Does the Arduino compiler support ifdef, depending on the ...
3
votes
2answers
969 views

Is it possible to run a binary from EEPROM?

Say I wrote a compiled sketch to EEPROM then read it. Could I run the program from EEPROM? I guess the question is: Can an Arduino run software not in flash memory in the middle of executing the ...
1
vote
2answers
697 views

Error compiling [duplicate]

I have this code: #include <TinyGPS++.h> #include <SoftwareSerial.h> #include <Wire.h> #include <Adafruit_MCP23017.h> #include <Adafruit_RGBLCDShield.h> #include ...
6
votes
3answers
2k views

Manchester Library Won't Compile for Attiny85

I am creating a wireless sensor using an Attiny85. I want to send the data to an arduino uno, so I purchased the 315mhz rf link kit from spark fun. Since the Attiny85 does not have a TX I decided to ...
1
vote
1answer
1k views

How to compile code for the Arduino Due?

I have set up Eclipse to compile for the Arduino Due using all the tools shipped with the Arduino IDE 1.5.6-r2. It compiles without errors, but when uploaded, the Arduino does nothing, and isn't ...
5
votes
1answer
1k views

Warning Arduino CMakeLists “Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES”

I'm trying to build an Arduino example without using its IDE. My OS is Windows 8.1 and I'm using the last version of CMake (2.8.12.2) and MinGW (GNU Make 3.82.90). I downloaded the Arduino ...
3
votes
1answer
747 views

Can I compile c/c++ code on the linux part of the Arduino Yun?

Can I compile c/c++ code on the linux part of the Arduino Yun? How complete is the linux part of the Arduino Yun? Can I scp some c/c++ code onto the Atheros AR9331 chip compile it? Or must I first ...
9
votes
4answers
2k views

Why do sketches take up so much space and memory?

When I compile this sketch for the Yún: int led = 7; void setup() { pinMode(led, OUTPUT); } void loop() { digitalWrite(led, HIGH); } I get: Sketch uses 5,098 bytes ...
11
votes
2answers
2k views

Why can't I declare a class in another tab in Arduino IDE?

I wanted to move some of my code out into a second tab in the Arduino IDE, to keep things better organised. At first, I only tried moving a function, and it seemed to work fine. I could call the ...
7
votes
1answer
80 views

Is there a preprocessor constant for memory size

I would like my compiles to exclude some code depending upon the flash/program space available. To be used in the demo code of a library I support. Whereas my current solution is to use a #ifdef of ...