Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [compilation-errors]

An error that is generated during the compilation phase, often due to problems with invalid syntax and/or types. Not for errors during the uploading or execution phase.

0
votes
1answer
21 views

How to add if condition with RFID Example

Using a Arduino Mega 2560 and PN532 NFC/RFID module, I want to be able to scan a card and see if it's value is (0xF0, 0x21, 0x5D, 0xA7). It should print "accepted" in the serial monitor. However ...
0
votes
2answers
51 views

Strange compiler error (Segmentation Fault)

You're getting a compiler error. It happens in strange parts of code that really shouldn't be having a problem. The error looks something like: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8....
0
votes
1answer
48 views

compilation error when changing variable from char to String

I have a code with these two lines: char handshakecode = "S"; // Capital S char receive; The lines of code are placed in a separate void, and not setup or loop. When i change the two variables ...
-1
votes
1answer
41 views

Can the function be written without “;” in the end? [closed]

I have seen the following code on the Internet: #include <SoftwareSerial.h> SoftwareSerial mySerial(8,9); void setup() { mySerial.begin(9600); Serial.begin(9600); delay(100); } ...
1
vote
1answer
29 views

How to deal with this array correctly?

I am using a led strip WS2812b, an ESP8266 (NodeMCU 1.0) and a gesture sensor APDS9960. I want that when I move my hand from left to right and from right to left I change the colors of the strip of ...
0
votes
1answer
311 views

“exit status 1” error when invoking “useInterrupt” method [duplicate]

for context to this post you can catch up on this post I am working with an Arduino Leonardo and Adafruit Music Maker shield. I am trying to use the startPlayingFile method via the interrupt pin ...
0
votes
0answers
22 views

My arduino is having an issue when uploading [duplicate]

So, it was working fine about a week ago, but today when I tried uploading (and i have tried on multiple arduinos, and multiple sketches) i get the following error code: Arduino: 1.8.5 (Windows 10), ...
0
votes
1answer
61 views

Include in different file make different compiling error

I'm have problem compiling a code. ardutest.ino: #include "mylib.h" #include <SD.h> void setup() { } void loop() { fn(); } mylib.h: #ifndef mylib_h #define mylib_h #include "Arduino.h"...
1
vote
3answers
644 views

error: expected primary-expression before '(' token

I have a decent level of programming skill, or at least I thought so. I've been getting an error when compiling this Ardulno sketch. I don't really know what this error means or how to fix it. What's ...
0
votes
0answers
375 views

SAMD: 'function' in namespace 'std' does not name a type

I'm trying to compile a sketch that uses the following code: std::function<void(char*)> callback = std::bind(&Animator::_callback, this, std::placeholders::_1); Verification of the sketch ...
0
votes
1answer
298 views

compile error when using two typename in template class

I am using Arduino 1.8.5 ide. I am just creating a class with two typename which name is "Map". This class takes all int and String variations. Like; class Map<int, int>; class Map<int, ...
0
votes
0answers
78 views

Blink example compilation error

I just installed the Arduino IDE on Mac and connected the programming port to my Arduino Due. I selected the corresponding board from Tools (though not sure which ATMEL programmer I should choose) I ...
0
votes
1answer
275 views

I get a redefinition of “…” on every single line, of every variable, class, function, etc

When I compile my program I get an error message saying redefinition of "..." on every single line, of every variable, class, function, etc. What am I doing wrong? int incomingByte = 0; // for ...
0
votes
1answer
321 views

“Does not name a type” error with Serial.print

I am getting an error that I have never seen before and don't know how to fix. Basically I am trying to print a string (stored in thermistor) to the serial monitor. When I run the code I get an error ...
0
votes
0answers
41 views

Arduino Zero AnalogReadFast Compiling Error

#include <Streaming.h> #include <StopWatch.h> #include <Albert.h> #include "avdweb_AnalogReadFast.h" const byte adcPin = A1; void setup(void) { Serial.begin(9600); while(!...
0
votes
0answers
1k views

IOT-GA6 gsm module Arduino +CME error 58

I've recently bought a IOT-GA6 gsm module . I want to use it to send an mms but doesn't work. The SMS and call work. When I execute the void function (mms) the monitor shows the error message +CME ...
0
votes
1answer
133 views

Compile Problem with RFDuino RFD22301

I have the following setup: - Arduino IDE for Mac 1.8.5 - RFDuino RFD220301 - CP2102 USB to UART connector - Board set to "RFduino" - port set correctly (but shouldn't matter as it is a compile error) ...
0
votes
0answers
35 views

Multiple references - Static variables and attachInterrupt

I am adventuring myself on sensor reading and stumbled on the following error. The code may be accessed on https://github.com/brunolnetto/tanque_solar/tree/big-refact. [NOT VALID LINK] Arduino: 1.8.5 ...
1
vote
1answer
189 views

Error: “undefined reference to …” when calling non-void class' functions from within class

I haven't used an Arduino for anything as complicated as this project before (single sketch projects so far), and am struggling getting my code to compile now that I'm creating my own libraries for ...
0
votes
0answers
46 views

The board is not uploading the code and returning the error message below. I use Ubuntu 18.04

Arduino: 1.8.6 Hourly Build 2018/04/03 01:25 (Linux), Board: "Arduino/Genuino Uno" Archiving built core (caching) in: /tmp/arduino_cache_780208/core/...
0
votes
2answers
2k views

I have the error: expected unqualified-id before 'if'

This is my Sketch or code: const int EchoPin = 5; const int TriggerPin = 6; const int LedPin = 13; void setup() { Serial.begin(9600); pinMode(LedPin, OUTPUT); pinMode(TriggerPin, OUTPUT); ...
0
votes
0answers
73 views

Problems uploading to intel galileo [duplicate]

I bought a galileo. installed the arduino1.8.5 on a newly installed linux unbuntu computer. Opened the IDE, connected and powered up the Galileo installed the board trough the Tools menu and opened ...
0
votes
0answers
39 views

My Mac Yosemite will download Arduino IDE, but won't upload without error

I'm getting this error code when I try to upload to my desktop Mac running Yosemite 10.10.5: Arduino: 1.8.6 Hourly Build 2018/04/03 01:12 (Mac OS X), Board: "Arduino/Genuino Uno" Sketch uses 3612 ...
-3
votes
2answers
1k views

Error : stray '\' in program

I got this error in the following program: #include <SoftwareSerial.h> #include <dht.h> dht DHT; int a; String temp; String humid; SoftwareSerial esp(0, 1); #define SSID "abcd" #define ...
0
votes
1answer
265 views

i586-poky-linux-g++: no such file or directory Error compiling for board Intel® Edison

I'm facing this compilation issue. Arduino: 1.8.4 (Linux), Board: "Intel® Edison" fork/exec /home/jimish/.arduino15/packages/Intel/tools/core2-32-poky-linux/1.6.2+1.0/i686/sysroots/pokysdk/usr/bin/...
0
votes
2answers
87 views

What is wrong with this code?

So I am writing code to control a servo with an RC radio. I am using an Arduino Mega. I get this error whenever I compile. I am not that experienced with Arduino so I am probably not doing something ...
0
votes
1answer
210 views

What is wrong with my code? Did you forget '()'?

#include <SimbleeBLE.h> // constants won't change. They're used here to set pin numbers: const int ButtonPlayPause = 15; const int ButtonNext = 12; const int ButtonPrevious = 11; const int ...
0
votes
1answer
274 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) ....
0
votes
3answers
2k views

How can i get rid of the error “cannot convert 'String' to 'const char*'”

I want to get this code to recognise different commands and be able to parse the rest of the command, fore example I send "/sleep 5", and it will sleep for 5 seconds. However, I keep on getting this ...
-1
votes
1answer
1k views

'import' does not name type ERROR

I am working with a group of people on an arduino controlled BB8 robot. We are using an IMU unit (accelerometer+gyroscope). I found a processing example for the IMU unit we are using. The code is ...
-2
votes
1answer
204 views

SOMETHING WRONG IN DHT22 PROGRAM showing error as expected unqualified id before'. ' token

I am using a arduino and dht22 sensor for my project purpose annd gettting error as expecte before unqualified '.' token MY CODE IS : #include <DHT.h> #include <LiquidCrystal.h> #...
1
vote
1answer
390 views

Ubuntu class string has no member remove

I am running some code that works fine on my windows system using the .remove method. On Ubuntu 16.04 I get the following errror: error: ‘class String’ has no member named ‘remove’ To see if it ...
0
votes
1answer
32 views

Constants within array of structs causes strange compiler errors?

In my sketch I have the following: #define HU_ADDR 0x190; #define ALL_AUDIO_ADDR 0x1FF; #define MY_ADDR 0x360; #define UNKNOWN_ADDR 0xFFF; typedef ...
2
votes
2answers
109 views

Purposely create compile error to fail the upload [closed]

I would like to create a compile error so sketch does not upload in certain cases. I have written a library with a function that adds pins being used to an array. If the same pin is used twice I ...
14
votes
1answer
2k views

Why can't my IF statement see a global?

I'm rather new to Arduino programming. I have a problem compiling the following bit of code: const int relay1 = 10; //Power Relay 1 const int relay2 = 11; //Power Relay 2 const int relay3 = 12; //...
1
vote
0answers
32 views

Are there documented Arduino class or file name restrictions?

I ran into a strange problem were the compiler could not find a header file that I knew existed. The problem was I created a class called ArduinoEvent and put it in ArduinoEvent.hpp, but when I ...
0
votes
1answer
163 views

Problem uploading the code into an Arduino Uno [duplicate]

I was trying to upload code for a blinking LED. It is a new Arduino Uno board. Any further help will be appreciated.I got the following error: Info.: OS- Ubuntu 16.04 Software: Arduino IDE 1.8....
-1
votes
3answers
944 views

Need help on the “expected primary expression before ”}“ token”

#include <SPI.h> #include <nRF24L01.h> #include <RF24.h> #include "Arduino.h" #include "SoftwareSerial.h" #include "DFRobotDFPlayerMini.h" #define M11 2 #define M12 3 #define M13 ...
0
votes
0answers
781 views

Does not name a type error

Hi i am getting the following errors when trying to do coding. C:\Program Files (x86)\Arduino\libraries\KTA259V3-master/KTA259V3.h: 51:5: error: 'Adafruit_MAX31855_Info' does not name a type ...
-3
votes
2answers
221 views

The code is showing a error that “ledpin2 is not declared in the scope” [closed]

int ledPin1 = 1; int ledpin2 = 2; int ledpin3 = 3; int ledpin4 = 4; int ledpin5 = 5; int ledpin6 = 6; void setup() { //initialize pins as outputs pinMode(ledPin1, OUTPUT); pinMode(ledPin2, ...
-1
votes
1answer
113 views

MySensors GatewaySerial code not compiling [closed]

I am trying to compile GatewaySerial code from MySensors library for my Arduino Leonardo and it gives me EEPROM errors. Gateway code: /** * The MySensors Arduino library handles the wireless radio ...
-1
votes
1answer
113 views

Hall effect sensor and water sensor

I'm working on a project based on the two sensor above but I keep getting this error: 'liquid_level does not name a type' This is my sketch: /* YF‐ S201 Water Flow Sensor Water Flow Sensor output ...
0
votes
0answers
326 views

Fixing Error Messages “Error Compiling for Adafruit FLORA” & “'BLUEFRUITLE_HWSERIAL_NAME' not declared in scope”

I am trying to create a Heart Rate Monitor using the Wearable Bluefruit LE Module and FLORA boards (by Adafruit). The code is shown below. I am trying to tweak it so it configures correctly with the ...
0
votes
1answer
44 views

Error with pointer in array

I am currently learning pointers. I am following a book (Says Teach Yourself "Arduino Programming") in which there is an exemple about pointer and array. void setup() { // put your setup code here, ...
0
votes
1answer
79 views

'TCCR0B' undeclared

I am trying to compile the function in http://playground.arduino.cc/Code/PwmFrequency This produces a couple of errors sketch/setPwmFrequency.c:34:3: error: unknown type name 'byte' byte mode; ...
-2
votes
1answer
48 views

Arduino GSM shield code help

Trying to run the below code but getting the following error message: exit status 1 expected unqualified-id before '==' token Code is as follows: ============================================== = ...
0
votes
0answers
150 views

Can't upload to arduino from clion

I'm trying to upload a script to my arduino uno (mega and nano doesn't work either). It works unless I #include <Adafruit_SSD1306.h> #include <Arduino.h> #include <Adafruit_GFX.h> #...
0
votes
1answer
558 views

Arduino Sketch: NodeMCU compilation error

Every time I try to compile a program written in Arduino IDE 1.8.5 for NodeMCU (LoLIN version v3), I get the following error: Arduino: 1.8.5 (Windows 10), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz,...
-1
votes
1answer
4k views

'DynamicJsonBuffer' was not declared in this scope

I have this code: #include <ESP8266WiFi.h> #include <ESP8266HTTPClient.h> const char* ssid = "xxxx"; const char* password = "xxxx"; bool a = false; bool b = true; int heldVal = 0; ...
0
votes
1answer
342 views

FastLED: “Invalid pin specified”

I have an Adafruit Trinket (5v, 16mhz, based off of the AtTiny85 chip), and am wishing to use it with a strip with 24 3 pin, individually addressable LEDs (WS2812B). When I try to compile my code, I ...