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.
0
votes
0answers
9 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
0answers
10 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
19 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
47 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
120 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
30 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
69 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
146 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
43 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
68 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
45 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 ...
0
votes
0answers
31 views
Can i only use Atmega 328 in standalone mode? [duplicate]
I have already prototyped my product, and i want to use arduino library in my printed circuit which includes ATmega32u4 (the MCU in arduino leonardo). Can i use the library? if i can how?
(i know the ...
2
votes
3answers
113 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
2answers
72 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
53 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
146 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
0answers
175 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
57 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
2answers
67 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
154 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
2k 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
681 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
442 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
1k 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
613 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 ...
8
votes
2answers
982 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 ...
10
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
68 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 ...