Questions tagged [debugging]
The process of finding and resolving problems ('bugs') in a hardware and/or software system.
94 questions
0
votes
1
answer
72
views
When I try to debug using Arduino IDE for stm32 using stm32duino nucleo F767ZI throws error
I am trying to debug using Arduino IDE through STM32Duino for my STM32 Nucleo-144 F767ZI. The code is uploaded successfully, but upon pressing debug, I get this error.
Waiting for gdb server to start....
-1
votes
1
answer
326
views
Large arrays crash the arduino
I have three large PROGMEM arrays, in order to store musical notes for a song. One array is the notes, one is the note durations, and one is the pause after the note.
The first array is an int one and ...
1
vote
0
answers
63
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 ...
3
votes
1
answer
268
views
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 ...
-1
votes
1
answer
60
views
'for loop' seems to change the execution of pow()
The first time, pow() works. But inside of a 'for loop', or again afterwards, it doesn't behave !? (I'm using a Chinese Pro Mini with Arduino 1.8.16)
EDIT
To clarify what I am asking, my question is:...
4
votes
1
answer
66
views
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 ...
0
votes
1
answer
3k
views
Serial communication of strings
I used this simple code to understand the basics of serial communication. This achieves simple communication between the computer and arduino:
String receive_buffer;
void setup() {
Serial.begin(9600)...
2
votes
0
answers
64
views
LED not lighting up despite digitalRead displaying 1
As part of a project, I created a simulation of a juncture with 4 traffic signals. The time for the green signal is set based on a function that calculates it based on an algorithm (and it takes the ...
3
votes
3
answers
4k
views
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 ...
1
vote
1
answer
2k
views
Onboard led HIGH and LOW seems reversed
On an ESP32 board I am trying this simple code to control the onboard led.
But if I set it to HIGH, led is OFF, if I set it to LOW, led is ON (fully bright).
What could cause this ?
The board has one ...
1
vote
0
answers
967
views
Display GPS module data to my TFT display
I am using Arduino Mega 2560 and I have written code for my GPS module (Neo-6m-0-001/GY-NEO6MV2) and it is working fine independently.
I also have written code for Compass module (QMC5883L) which is ...
4
votes
3
answers
3k
views
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 ...
-1
votes
1
answer
308
views
Serial.print array displays nothing
I tried Serial.print an array I had made, but the Arduino displays nothing in the monitor.
I tried doing Serial.print("Hehehe"); as a test, but it just displayed "h?h?h?".
The monitor works fine ...
15
votes
4
answers
7k
views
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 ...
0
votes
1
answer
367
views
How to debug Arduino using Atmel studio?
I have an Arduino Yun board and an Atmel ICE programmer/debugger. There are 6 pins on the Arduino Yun to connect to Atmel ICE for programming only, but I can't find the pins for debugging. Anyway to ...
1
vote
1
answer
114
views
Maximum Capacity Debugging
1. Example
Check the program below for an Arduino Nano, Old Bootloader, for variable values of N.
For low values (N<=1857), the program outputs "[FFFFFFFF]",
For higher values (1858<=N<=...
2
votes
2
answers
10k
views
Proteus - How to Debug Invalid Opcode?
While running a program compiled in the Arduino IDE 1.8.5 and then using the .ELF file inside LabCenter Proteus 8.0, for an Arduino Nano ATMEL Mega 328P, for a code involving the use of the ...
-1
votes
1
answer
1k
views
Debugging a Nordic MCU (feather NRF52) using Segger J-Link
I have an Afafruit NRF52 board with SD 132 and 5.1 dual fw bootloader.
I implemented RTT logging and controlling (input) and the code is compiled using arduinoBuilder with RTT and debug level 3.
The ...
3
votes
2
answers
5k
views
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 ...
1
vote
3
answers
7k
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 ...
2
votes
2
answers
564
views
VisualMicro Can't compile in debug ('Serial' was not declared in this scope) for attiny84a
I was working on a project build initialy from the Arduino IDE to program an attiny84a (without a bootloader) using the board from https://github.com/damellis/attiny
I got an atmel-ice recently and I ...
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
votes
1
answer
92
views
Serial speed for debugging/logging
I have a sketch where I want to check my nRF24L01's and they work great.
However, due to Serial.print(ln) statements I noticed there is a lot of delay. Is this normal?
I mean, is it better not to ...
1
vote
2
answers
616
views
How to programmatically choose "board model" and "port number" in Arduino IDE?
I'm testing three different Arduino (nano, Uno and Mega) each of them having a nRF module. The codes (sketches) are different for each module.
I've connected the arduinos to my single laptop via 3 USB ...
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 ...