Skip to main content
8 votes
Accepted

How are errors (not related to syntax) managed in arduino and in the AVR architecture in general?

The simple answer is: they are not handled at all. According to the C and C++ standards, what you are invoking is called undefined behavior, meaning anything can happen. In practical terms, it means ...
Edgar Bonet's user avatar
  • 43.1k
6 votes

Not enough memory error using OneSheeld.h

Including the whole library, which is what you are doing, does not work on small boards like yours. Instead you have to only use the parts of the library that you need. Fortunately the OneSheeld ...
Majenko's user avatar
  • 105k
5 votes
Accepted

Why is the IDE not able to find the board despite it being clearly seen and selected?

The SAMD boards connect to computer over native USB support of the MCU. The handling of the USB is done by Arduino core functions linked at build to your sketch. A consequence of using the native USB ...
Juraj's user avatar
  • 18.1k
5 votes
Accepted

'Var' does not name a type!

You cannot put an expression statement outside a function. Only the variable declarations can be placed outside functions (and those variables are called globals/global variables). Try the following: ...
Michel Keijzers's user avatar
5 votes

esp32, platformio A fatal error occurred: Packet content transfer stopped (received 8 bytes) *** [upload] Error 2

I was able to resolve this issue by detaching jumpers that i had connected to the GPIO 12/13 pins during upload. After uploading they can be attached again. See this github issue: https://github.com/...
Trizion's user avatar
  • 51
5 votes

esp32, platformio A fatal error occurred: Packet content transfer stopped (received 8 bytes) *** [upload] Error 2

I had this error when trying to upload a sketch from Arduino IDE to a TTGO T-Display, found that I could resolve this by changing the upload speed from the default of 921600 to 115200. After doing ...
steoleary's user avatar
  • 151
4 votes

Strange values on Serial Monitor even with matched baud rate

You can't concatenate string and value inside Serial.println(). Print them using two different Serial.println(). int pin12; int A12 = A12; void setup() { // put your setup code here, to run once: ...
leoc7's user avatar
  • 603
4 votes

Arduino freezing frequently

Any allocation / de- or re-allocation of memory[1] during run time, will cause the heap (the pool of memory from which those allocations are made) to expand until the heap and the stack grow toward ...
JRobert's user avatar
  • 15.3k
4 votes
Accepted

What does avrdude: Device signature = 0x000000 mean? Faulty wiring? Software issue? Incorrect tutorial?

There is one part of the tutorial that is incorrect - or rather missing. When you open the serial port the Arduino resets. That includes when the serial port is opened by avrdude. You need to prevent ...
Majenko's user avatar
  • 105k
3 votes

Arduino sketch uses too much memory storage space?

There is no problem here, please read the message carefully! It says you are ONLY using 30% of the available program memory and 19% of the dynamic memory. You have a LOT more room left.
jwh20's user avatar
  • 1,045
3 votes

I get an error saying, "exit status 1 expected initializer before 'void'."

Functions must have a body. So instead of: void setup() You need: void setup() { // do nothing } You have other issues, for example this is not C++: int (n,i,j,result); That should be: ...
Nick Gammon's user avatar
  • 38.2k
3 votes

How can I fix this error "invalid operands of types 'const char [17]' and 'float' to binary 'operator+'"?

These lines give you errors, because you cannot simply add character arrays (aka c-strings) and floats together with the + operator. C/C++ is very strict, when it comes to variable types. The compiler ...
chrisl's user avatar
  • 16.3k
3 votes
Accepted

Error: Does not name a type

class subject { public: char subjectname[]; char classroom[]; }; This creates a class subject which has two char arrays of unspecified size as its members. This will attempt to create an array ...
Maximilian Gerhardt's user avatar
3 votes

Serial.println Issue with Flame Sensor

First things first; please INDENT YOUR CODE. The code you posted is a mess and I took at least double the time to fix that. First, you have an extra closing curly bracket at line 17 and the if (Fire ...
he77789's user avatar
  • 151
3 votes

Not enough memory error using OneSheeld.h

Your problem is caused by using too much RAM, not program memory, as the error message says: Global variables use 2087 bytes (101%) of dynamic memory, leaving -39 bytes for local variables. Maximum is ...
Liftyee's user avatar
  • 126
3 votes

The Arduino copy of example code for tone() function produces a compile error: 'tone' is not declared in this scope. How can I fix this?

In short, they just never implemented tone() in the Due/SAM core. So you're not going to get the normal tone() function working. The tone.h header is empty. They probably should done any number of ...
timemage's user avatar
  • 5,231
2 votes

Error when compiling code NODE MCU ESP8266-12E module in Arduino ide

The section void loop() { } Is missing in the code, add it and recompile and.....
MatsK's user avatar
  • 1,356
2 votes

Arduino Firebase connection refused error

You added a / to the end of the Humidity and Temperature collections. e.g Firebase.pushString("Humidity/", fireHumid); Firebase.pushString("Temperature/", fireTemp); The firebase API ...
Peter Paul Kiefer's user avatar
2 votes

Arduino - "expected primary-expression before '.' token" Error

Ultrasonic is a class name. Why are you trying to use it before a . in an expression? Judging by the declaration, you need ultrasonic. That is your object name. ultrasonic, not Ultrasonic.
AnT stands with Russia's user avatar
2 votes
Accepted

program evaluating if clause incorrectly

Do not put a ; after an if: if(flag != 0xaa); is the same as if(flag != 0xaa) { } Meaning that the code after the if statement is always executed.
Michel Keijzers's user avatar
2 votes
Accepted

ESPTool 3-run stub fail error

Just wanted to update and let anyone who had a similar issue learn how I solved the problem. My baud rate was set to 1152000 rather than 115200. Setting it to 115200 solved my problem.
jimmyfinestein's user avatar
2 votes

Node MCU not functioning correctly

Can anyone just try to upload this code to their node MCU with changing the WiFi credentials and the blynk Auth token to one of your own project by following the blynk guide and check if it is ...
timemage's user avatar
  • 5,231
2 votes

error: expected primary-expression before ',' token edit status 1

You have two commas in the command when making the lcd object: LiquidCrystal lcd(13,,12,11,10,9,8); Probably just a typo, delete the comma and you should be good to go. LiquidCrystal lcd(13,12,11,10,...
Python Schlange's user avatar
2 votes

What does avrdude: Device signature = 0x000000 mean? Faulty wiring? Software issue? Incorrect tutorial?

Unfortunately the three prominent threads on the Arduino forum on this topic are closed, so their good but incomplete information is baked in time: Invalid device signature error Which references: ...
Heath Raftery's user avatar
2 votes

What should I do with stackOverflow in compile error?

Sketch uses 444 bytes (1%) of program storage space. Maximum is 32256 bytes. Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes. This ...
tim's user avatar
  • 699
2 votes
Accepted

esp32, platformio A fatal error occurred: Packet content transfer stopped (received 8 bytes) *** [upload] Error 2

For anyone wondering, i found out it means that there's some kind of disconnect between the computer from which your uploading and the file system. Essentially, the esp32 is broken.
exo's user avatar
  • 57
2 votes

WiFiClient.cpp:517 flush(): fail on fd 48, errno: 11, "No more processes" what it mean?

I think you ran into the issue described on Github issues for WifiClient. A user has loooked into this and found that the error message does not match the problem: errno 11 (EAGAIN) happens when you ...
Thomas Weller's user avatar
2 votes

A fatal error occurred: Failed to connect to ESP32: Wrong boot mode detected (0x13)! The chip needs to be in download mode. [upload] Error 2

I purchased a NodeMCU clone ESP32 board and encountered this error. A fatal error occurred: Failed to connect to ESP32: Wrong boot mode detected (0x13)! The chip needs to be in download mode. [upload]...
Raja's user avatar
  • 141
2 votes

STM32 "black pill" won't enter DFU mode reliably

I found this solution in the stm32duino forums: Tying A10 to GND successfully makes it enter DFU bootloader mode 100% of the time (though just not leaving PA10 floating is probably sufficient) ...
NeilenMarais's user avatar
1 vote

I get an error?

One tip to prevent these kind of error: next time align the { and } and you see the error very fast: void setup() { Serial.begin(9600); pinMode(13,OUTPUT); } void loop() { char s_num; if(...
Michel Keijzers's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible