Questions tagged [debugging]

The process of finding and resolving problems ('bugs') in a hardware and/or software system.

94 questions
17
votes
6 answers

How do I resolve "avrdude: stk500_recv(): programmer is not responding"?

Whenever I try to program my Arduino UNO Rev.3, I'm seeing the following error avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not…
Evan Carroll
  • 455
  • 1
  • 6
  • 16
15
votes
4 answers

My code seems to be a train wreck

I am new to programming and I thought a simple project to do would be to create an ammo counter. I have been troubleshooting this code for several hours now, and can not figure out why my code is riddled with errors. Below is my program. Please give…
pvGuy
  • 183
  • 1
  • 9
9
votes
4 answers

How to use breakpoints for debugging

Breakpoints are a great way to see how the compiler runs to your code. Now my question is, is there a possibility to use breakpoints when you debug your code?
H. Pauwelyn
  • 207
  • 1
  • 2
  • 10
9
votes
1 answer

Overview of compiled code size

When I compile my code, the Arduino IDE returns the binary sketch size in byte. Is there a good way to find out (approximately) what function or what part of my code takes up how much memory in flash, so that I get a feeling what feature takes most…
fuenfundachtzig
  • 1,535
  • 1
  • 14
  • 26
5
votes
2 answers

How do I debug on-chip with Arduino?

Though an emulator is quite useful for debugging code that has no side effects, most real-world applications include some circuitry besides the Arduino. If a microcontroller on an Arduino had a JTAG interface, it would be pretty straight-forward,…
polkovnikov.ph
  • 169
  • 1
  • 7
4
votes
1 answer

Custom LED toggling function: one out of three LEDs misbehave

I connected three LEDs to an Arduino Uno and wrote a simple LED class. I toggle all the leds the main loop, but for some reason one led (connected to pin7) always misbehaves, skips one toggle or stays on all the time. Initially all leds are off (in…
Jurc192
  • 73
  • 6
4
votes
1 answer

Help solving "collect2.exe: error: ld returned 1 exit status" error in code

I just got an Elegoo UNO starter kit the other day and have been working my way through the little tutorials on all the parts it came with. I am using VSCode with Platform.io plugin and (after getting it set up) it has been working nicely. The code…
wileyrivers
  • 61
  • 1
  • 1
  • 5
4
votes
3 answers

How compile an Arduino program for a desktop PC

I have an arduino program that only does serial communications with a little bit of math, and I am writing another one to communicate with it on a second arduino. For testing purposes I was hoping I could run the serial only program on my desktop. …
bob mcgrath
  • 55
  • 2
  • 4
4
votes
1 answer

Does ATMega 328/2560 chips support JTAG-type programmer and hardware debugger?

As stated in www.Arduino.cc FAQ, "Can I use an Arduino board without the Arduino software? Sure. It's just an AVR development board, you can use straight AVR C or C++ (with avr-gcc and avrdude or AVR Studio) to program it." For UNO/Pro…
EEd
  • 904
  • 1
  • 14
  • 21
4
votes
3 answers

why does function affect my ISR?

I am currently running this piece of code: main.ino #include "speed_profile.h" void setup() { // put your setup code here, to run once: output_pin_setup(); cli(); timer1_setup(); sei(); } void loop() { //int motor_steps =…
Lamda
  • 141
  • 4
3
votes
1 answer

Simulating a button press using the Serial Monitor to run a Servo

I'm kind of new to Arduino and C, and I was having trouble with this sketch. I'm working on a project to control 6 servos using virtual buttons. When I hold down the button, the servo moves forward smoothly to a certain fixed point, and when I…
rayank97
  • 31
  • 1
3
votes
3 answers

How to get rid of low quality sound out from DFPlayer plus amplifier?

I use my Seeeduino V4, DFPlayer mini, and this speaker module from AliExpress to create an automatic doorbell. The problem is that it seems that this speaker module's Yurobot amplifier is not powerful enough to create a noise-free loud sound. Also,…
Starter
  • 153
  • 1
  • 13
3
votes
2 answers

Can't Upload Sketches to Arduino Nano Every

first-time builder here. I just got my Arduino Nano Every in the mail from Mouser, and I'm trying to upload a modified version of the blink example to my new brand-new board. However, every time I try to upload a sketch, the IDE just spins its…
Kronimiciad
  • 131
  • 4
3
votes
2 answers

Using Serial Plotter with Visual Studio Code

I'm using the Visual Studio Code extension to develop for Arduino which works great. It doesn't have a Serial Plotter like the regular Arduino IDE, which I need to debug this project. I can run the Arduino IDE's Serial Plotter alongside Visual…
Joel Spolsky
  • 171
  • 1
  • 8
3
votes
2 answers

How do I see underlying code and definitions inside Arduino IDE on MacOS X El Capitan

I'm a newbie to Arduino so please excuse the easy question and guide me to the appropriate sources or forums. I just bought an Arduino Uno Starter Kit that comes with the "Arduino Projects Book" by Scott Fitzgerald et al and I'm happily working my…
Dave
  • 157
  • 1
  • 6
1
2 3 4 5 6 7