Questions tagged [debug]

Debug (debugging) is a methodical process of finding and reducing the number of bugs, or defects, in a computer program.

Debugging is a methodical process of finding and reducing the number of bugs, or defects, in a computer program or a piece of electronic hardware, thus making it behave as expected. Debugging tends to be harder when various subsystems are tightly coupled, as changes in one may cause bugs to emerge in another. Many books have been written about debugging, as it involves numerous aspects, including interactive debugging, control flow, integration testing, log files, monitoring (application, system), memory dumps, profiling, Statistical Process Control, and special design tactics to improve detection while simplifying changes.

21 questions
10
votes
1 answer

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?
Igor Stoppa
  • 2,125
  • 1
  • 15
  • 20
2
votes
1 answer

Arduino Hanging Not sure if software or hardware issue

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 the Arduino after some time interval and LEDs…
Ashish Jog
  • 31
  • 4
2
votes
2 answers

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 MicroSD card. When I try to use this standard sketch…
Starter
  • 153
  • 1
  • 13
2
votes
1 answer

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 happens. My project doesn't need any serial…
user26383
  • 81
  • 1
  • 10
1
vote
1 answer

Is there a way to use symbolic names for debug watch of RISC-V registers?

Re debugging RISC-V CH32V2xx/CH32V3xx Is there a way to watch 'RCC_CFGR0', say, rather than '* 0x40021004'? eg. add definitions to GDB? (program compiled with -g option and optimized for debug, IDE 2.3.6)
1
vote
0 answers

Debug Macro Not working

I wrote simple program to test debug macros, but it gives me compilation error Program: #include #define DEBUG #ifdef DEBUG #define DPRINT(...) Serial.print(__VA_ARGS__) #define DPRINTLN(...) Serial.println(__VA_ARGS__) #else …
MrNams
  • 129
  • 5
1
vote
1 answer

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 connector J100 to a Black Magic Probe and GDB The two…
RowanP
  • 869
  • 6
  • 21
1
vote
0 answers

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 heart rate. The threshold might be the problem…
David Chan
  • 11
  • 2
1
vote
0 answers

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 would like to get debug software that will tell me…
RickH
  • 41
  • 1
  • 8
1
vote
1 answer

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 monitor does not print the stack trace. (as shown…
blazingcannon
  • 149
  • 1
  • 4
1
vote
0 answers

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 after the Arduino SW installation, the command:…
1
vote
1 answer

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 in the code? Please see and identify the…
1
vote
2 answers

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 variable (foundSym) that will turn to 0 if the…
paulj
  • 13
  • 2
1
vote
1 answer

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 errors instead. Nothing related to the errors…
user26383
  • 81
  • 1
  • 10
1
vote
1 answer

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 my Due board with my PC anytime, the LED turns on…
Masood Salik
  • 47
  • 2
  • 9
1
2