Questions tagged [debug]
Debug (debugging) is a methodical process of finding and reducing the number of bugs, or defects, in a computer program.
20
questions
1
vote
0
answers
99
views
Debug Macro Not working
I wrote simple program to test debug macros, but it gives me compilation error
Program:
#include <Arduino.h>
#define DEBUG
#ifdef DEBUG
#define DPRINT(...) Serial.print(__VA_ARGS__)
#...
1
vote
1
answer
182
views
Does Arduino Zero need to be switched between USB EDBG and JTAG port debug use?
I wanted to compare the debug output of the Arduino Zero when connecting via two different debug paths.
Via the embedded debugger (EDBG) connected to Arduino IDE via USB
Via the JTAG hardware ...
1
vote
0
answers
42
views
Need help with debugging a heartrate/filter code (the heart rate calculation does not work)
The code below is a program that aims to apply the Pans-Thompskin algorithm to a signal attained from a ECG filter. The filter seems to work alright but it fails to blink the LED and collect a correct ...
0
votes
1
answer
74
views
A strange bug in my Arduino ALU
I have discovered a strange error in my Arduino. It's not in the code. I think it's a hardware bug in the ALU of the microcontroller, maybe in clone only.
So there is a variable called feedLimit and ...
2
votes
1
answer
75
views
Arduino Hanging Not sure if software or hardware issue [closed]
I am trying to run a very simple program to glow LEDs in a certain fashion, I connected 9 LEDs to the GPIOs or digital pins, 2 To 10, via 220 Ohm resistors; when I am running the program it is hanging ...
2
votes
2
answers
2k
views
DFPlayer Mini with its standard library does not being initialized
I have a DFPlayer Mini bought from AliExpress.
The player works correctly in standalone mode, but I am having troubles while using it with the following components:
Seeduino v4.0;
2GB Smartbuy ...
1
vote
0
answers
77
views
Need debug Software that can be used with Arduino IDE
Background: I have made a standalone Arduino board using Atmega328PB. I have written code for a clock which lights LEDs based on the time. After a day or so it locks up. Sometimes it reboots.
I ...
1
vote
1
answer
3k
views
How to print stack trace and register dumps on arduino serial monitor?
I want to debug my ESP32 module which is giving an exception using ESP32 exception decoder, but for that, I would need to have access to my stack trace to paste it. But currently, my arduino serial ...
0
votes
2
answers
926
views
"expected primary-expression before '.' token" in debug code
I'm making some code for school, and is adding debug code to it. When compiling, I get the error as written in the title. This is the code in question:
#define DEBUG 1
#ifdef DEBUG
#define Serial....
1
vote
0
answers
108
views
Arduino_Debug doesn't successfully upload sketch to Arduino if JAVA is not installed
I use arduino_debug to upload my sketch to an Arduino Mega 2560 and to an Arduino Due from my application (Windows).
I saw the following issue:
When JAVA is not installed or it was installed only ...
0
votes
2
answers
1k
views
How to use #define in a library I'm trying to write?
I have written simple code to enable toggling of serial.print debug data.
#define DEBUG
#ifdef DEBUG
#define DEBUG3(x,y,z) Serial.print(x);Serial.print(" ");Serial.print(y);
Serial....
1
vote
1
answer
1k
views
Temperature sensor bugs
My project is based on a moving fan using DHT11 sensors. I have used 2 void loops and the IDE is showing an error
"exit status 1
redefinition of 'void loop()'"
One doubt: Can we use 2 void loops ...
0
votes
1
answer
984
views
Why is integer-to-string not working in this sketch?
I am using a Pro Mini to read analog values and to send them via serial.
Goal of the sketch is to stream these values to Serial as fast as possible, to obtain a steady stream of at least 1000 ...
1
vote
2
answers
459
views
Function only taking the first 4 elements of a character array
I'm writing a function for my arduino program that takes a character array of any size and will mark all the characters that aren't in the alphabet by changing their value to '1'.
I have a switch ...
1
vote
1
answer
172
views
I swear this worked yesterday!! - mysterious compiler error
I thought I finally had this working yesterday, the code compiled, and executed on the arduino, there were however some small quirks but today I went to fix a small timing issue, but got the following ...
2
votes
1
answer
2k
views
Code will not run when Serial Monitor is not open
My code runs perfectly as long as the serial port is open. However if I connect it to external power, or even if I just try to run it plugged into my computer with the Serial Monitor not open, nothing ...
0
votes
1
answer
6k
views
Debugging my created Library - Error - request for member ... which is of non-class type
This seems to be a very common error, I am struggling to understand what exactly the solution to this is. I am attaching everything, library files, code, and errors. If you have a moment, I need ...
1
vote
1
answer
418
views
Arduino Due ( Atmel Microcontroller) IC Heat up and led goes off
I was connecting L293d Motor Driver IC with an Arduino Due Board. May be due to wrong connections, but when I made the grounds common, the Arduino LED goes off and Atmel IC heats up. When I reconnect ...
0
votes
3
answers
3k
views
What's with the debug error messages, like VMDPE_1|1_VMDPE?
I'm using visual micro for visual studio, and I understand this kind of thing is caused by conflicting serial data when I try to read and print to the main serial at the same time, right?
Well, I ...
10
votes
1
answer
4k
views
How to design and debug a custom I2C master-slave system?
How to proceed, when in need of a custom I2C master-slave system?
What are the design criteria to apply?
What are the debugging tools one can use to troubleshoot problems?