Questions tagged [compile]

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.

Filter by
Sorted by
Tagged with
0 votes
2 answers
473 views

How to prevent inclusion of unnecessary libraries?

How do you save space by preventing the inclusion of unnecessary binaries? When I compiled the ROS Blink example, I received the warning: Global variables use 1,951 bytes (76%) of dynamic memory, ...
Cerin's user avatar
  • 1,598
2 votes
0 answers
169 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 ...
Kahurangikea's user avatar
4 votes
2 answers
2k views

Any way to include the text of a file inside a sketch, to make it shorter and neater?

I'm wondering if there is any way to include the text of a file into a sketch by using a single placeholder command, similar to the "#Include" command when using Server Side Includes on .shtml files. ...
Jerry's user avatar
  • 533
5 votes
6 answers
14k views

LCD 16*02 I2C shield only shows first character printed

I have an I2C LCD screen provided with a Sunfounder kit and certainly built by DFRobot or such a constructor (there is nothing written on the LCD), and an Arduino Uno R3 copy. My issue is when I use ...
AFract's user avatar
  • 193
0 votes
2 answers
1k views

Formatting and code errors?

Hello I have managed to get both the Adafruit Datalogging shield walk-through and this individual code working http://www.learn.parallax.com/reed-switch-arduino-demo separately, but trying to combine ...
Andrew's user avatar
  • 3
0 votes
1 answer
249 views

Can anyone explain how this code can be converted to work on a Arduino Uno [closed]

I was hoping someone could help, im totally new to this. I wish to use this code for a Raspberry Pi on an Arduino Uno with the Adafruit SD data logging shield. It is for recording reed switch closures ...
Andrew's user avatar
  • 3
0 votes
1 answer
159 views

Compilling error not highlighting line in code

A newbe here. How come when I compile with an error I do not get the line or line number highlighted? I Get the errors just can't find where they are.
WilberMaker's user avatar
0 votes
1 answer
237 views

Can Arduino libraries be compiled for ARM MCU's?

I am looking for a very low power Micro-controller to interface with the RockBlock Iridium modem. The MCU I am thinking of purchasing is the Gecko Zero by Silicon Labs. I want to know if it is ...
J. Clark's user avatar
30 votes
6 answers
56k views

How to compile, upload and monitor via the Linux command line?

Interfacing an Arduino Uno (uploading etc.) with the Arduino IDE (using the Fedora package) works fine under Fedora 21. But I rather want to use vim + make + vim-quickfix-mode etc. How can I do that?...
maxschlepzig's user avatar
1 vote
1 answer
1k views

undefined reference to `PPMintIn::PPMintIn(int)'

I am making a new library that will utilize PinChangeInt's library. My intention is to further simplify repetitive code by creating a library. (This is to allow for multiple PPM channels without ...
tisaconundrum's user avatar
2 votes
1 answer
461 views

Arduino Servo.h library returns error in compilation

I have a problem with Servo library. This is my (very short XD) "code": #include <Servo.h> void setup() { Servo.attach(9, 554, 2400); } void loop() { Servo.write(2000); } And it returns: ...
Nicolas's user avatar
  • 35
1 vote
1 answer
67 views

arduino boards manager configuration

I installed the Arduino IDE 1.6.4, and used the "boards manager" to install the package for Arduino Due. I am using c++11 in my project so i need to add the compiler.cpp.extra_flags=-std=gnu++11 like ...
hariseldon78's user avatar
0 votes
1 answer
634 views

How do I compile the Marlin firmware?

I have a folder of mostly .h and .cpp files for the Marlin firmware (3D Printing) from here. How do I compile that so I can upload it to my Arduino Mega with Ramps?
Chase Cromwell's user avatar
0 votes
3 answers
2k views

Adafruit DHT22 Library + Arduino Due not compiling?

i recently purchased a DHT22's and tried to get it to work using Adafruit's DHT library on Github. When i compile it with a Arduino DUE, it gives me the following error: C:\Users\Moz\Documents\...
Darellon's user avatar
  • 238
4 votes
1 answer
403 views

Why does this code execute?

After experiencing failures of my Arduino projects due to low memory, I decided to do some research into it so I could understand better where the problems were. I eventually came to this code: void ...
user avatar
3 votes
1 answer
58k views

avrdude : stk500_get sync<> attempt 10 of 10 not in sync : resp=0x20 how do i get pass this error for ardunio uno board [duplicate]

When I first started with a bare minimum code. The compiler compiles the code, but when I try to upload, this is the error message I get: AVRDUDE: STK500_GETSYNC<> ATTEMPT 10 OF 10 NOT IN SYNC ...
mike harmon's user avatar
1 vote
1 answer
967 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. /* TV-B-...
awsomecp173's user avatar
2 votes
1 answer
120 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 ...
Nehil's user avatar
  • 53
8 votes
2 answers
15k 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 ...
connorwstein's user avatar
0 votes
2 answers
169 views

Problem using Ino build for 8 MHz

I want to use the Ino command line toolkit to build and upload my HEXes. 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 ...
rslite's user avatar
  • 413
0 votes
1 answer
1k 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[] = {NOTE_B0,NOTE_C1,NOTE_D1,NOTE_E1,NOTE_F1,NOTE_G1,NOTE_A1,...
Preston Shumway's user avatar
-5 votes
1 answer
701 views

nRF24L01+ Arduino mpu6050 [closed]

How do I ever understand what the Arduino IDE means when they advise you of any errors? The reason I ask is because I got several errors that don't make sense to me as I see what the error means and ...
Frank's user avatar
  • 51
0 votes
2 answers
5k 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 ...
Tommi P. Laiho's user avatar
0 votes
1 answer
408 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 ...
NULL's user avatar
  • 810
2 votes
0 answers
432 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?
Alex Antonov's user avatar
0 votes
1 answer
326 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 ...
Alex Antonov's user avatar
2 votes
0 answers
383 views

Problem in Uploading through Visual Studio

This is my simple program: int led = 13; void setup() { pinMode(led, OUTPUT); /* add setup code here */ } void loop() { digitalWrite(led, HIGH); delay(1000); digitalWrite(led, LOW)...
Shiran Abbasi's user avatar
1 vote
1 answer
393 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 ...
user45183's user avatar
7 votes
4 answers
34k 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 ...
Andy's user avatar
  • 103
1 vote
1 answer
1k 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 ...
Cerin's user avatar
  • 1,598
2 votes
1 answer
4k 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.
Mela Mustika's user avatar
3 votes
2 answers
866 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: ...
Claudiaum's user avatar
2 votes
1 answer
424 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 ...
user avatar
1 vote
2 answers
946 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 ...
lawnmowerlatte's user avatar
0 votes
1 answer
635 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 ...
cbmeeks's user avatar
  • 247
1 vote
3 answers
589 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 ...
kara's user avatar
  • 19
6 votes
6 answers
24k 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 equally ...
Joris Groosman's user avatar
5 votes
2 answers
1k 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 ...
Joris Groosman's user avatar
10 votes
1 answer
4k 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 ...
UserK's user avatar
  • 559
0 votes
2 answers
5k 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 ...
Bay's user avatar
  • 305
0 votes
1 answer
828 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 ...
Adam Haile's user avatar
2 votes
3 answers
195 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 ...
Paul Terwilliger's user avatar
5 votes
1 answer
894 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 -...
xyz's user avatar
  • 359
15 votes
1 answer
38k 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 ...
PhillyNJ's user avatar
  • 1,158
8 votes
2 answers
6k 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 ...
Piper McCorkle's user avatar
1 vote
2 answers
4k 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 <...
user1584421's user avatar
  • 1,385
8 votes
3 answers
6k 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 ...
Joel's user avatar
  • 523
2 votes
1 answer
4k 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 ...
Friend of Kim's user avatar
7 votes
1 answer
4k 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 ...
fenix688's user avatar
  • 173
6 votes
1 answer
2k 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 ...
Johan's user avatar
  • 415