The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [debugging]

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

Filter by
Sorted by
Tagged with
0
votes
2answers
32 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....
0
votes
1answer
38 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 ...
0
votes
1answer
85 views

ESP - Nodemcu amica - attachInterrupt crash program

I get new boards from the shop but they are little different from the previous version. I got software what works ok on Nodemcu lolin v3 now I get Nodemcu Amica what is almost same board but if I got ...
1
vote
1answer
30 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<=...
1
vote
0answers
71 views

Arduino IDE - debugging Exception 29

I installed the ESP EXCEPTION DECODER along with my Arduino IDE. When my sketch crashes with Exception 29, I take the stack trace and input it, but I can't understand its line references (they dont ...
0
votes
0answers
101 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 ...
0
votes
1answer
63 views

Weird problem with arduino

I wrote the code below and the result is not what I expected at all! I'm not sure why it's happening! void setup() { // put your setup code here, to run once: Serial.begin(9600); } const uint8_t ...
0
votes
1answer
234 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 ...
0
votes
1answer
42 views

Debug-logging without using Serial.print and without WiFi

In order to transmit text from the Arduino board to the HC-05 Bluetooth module, I have use Serial.print. However, I don't see a way to debug the code without using Serial.print to test the other ...
2
votes
1answer
533 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 ...
0
votes
2answers
62 views

For loop broken? [closed]

This is a pseudo code from my LED cube project void loop(){ //switch( map(constrain(analogRead(pt),10,1020),10,1020,1,4)); - for select pattern //show(1); for(lp=128;lp>=1;lp = lp/2){ ...
1
vote
3answers
2k 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 ...
0
votes
1answer
36 views

don't save on tab

Ok, I made some changes to the code and I wish they would see it. At the moment the program has a bug, it is not saving the contents of the txt file to the table, can someone give some lights? #...
1
vote
0answers
34 views

problem with communication between Linux and microcontroller [closed]

Hello Arduino community, I am new to the Arduino community and would like to ask for help (I work on a Arduino TIAN). Indeed, since 2 3 weeks I try through simple programs to understand the operation ...
1
vote
2answers
212 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 ...
-2
votes
2answers
2k views

Counting number of people inside a room [closed]

I want to count the number of people in a room using a microcontroller (Arduino Uno). I have 2 ultrasonic sensors at a doorway about a 1.5m apart from each other. I want to increment the number when ...
0
votes
2answers
385 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....
0
votes
0answers
153 views

HMC5883L stops reading when x-axis value get to positive value

I've been looking for a solution for this problem for quite a time I tried different I2C libraries; like, I2C master library using hardware TWI interface * Author: Peter Fleury But the same ...
0
votes
1answer
49 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
1answer
120 views

Controllino Debugging

Its a well known fact, that you can debug your arduino board with the help of an Atmel Ice. However, you might know the Controllino which is an arduino compatible device. It has an ATmega2560 on it. ...
1
vote
2answers
251 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 ...
0
votes
1answer
2k views

Multiple MFRC522 RFID reader on Uno bugs

I have a problem! I need to connect 5 MFRC522 readers on an Arduino Uno but it is not working ! With one or two MFRC522 modules it works, when I use three or more nothing works anymore... The serial ...
1
vote
1answer
623 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
1answer
356 views

47Effects MIDI Library and serial debugging

I noticed that since I use the MIDI library from 47effects, I cannot use the print(ln) for the serial port for debugging purposes, neither I can find it in the documentation. It states that the MIDI ...
2
votes
1answer
44 views

From Exploring Arduino Text

I am working thru the Exploring Arduino text mostly with success up until chapter 4. I have most of the parts required but for Figure 4-3 I used the following: 100nF Capacitor, (In place of 1uF ...
1
vote
1answer
355 views

Why does static member std::map reset ESP8266 when outside the .ino file?

Here's an example of a class which crashes the ESP8266-03 causing it to reset: Test.hpp file: #include <map> class Test { public: int data() const; Test(int x); ~Test(); ...
1
vote
1answer
830 views

`servo.attach()` paralyzing (one) motor on L298N

I have 2 DC motors (well, 4; but each pair is controlled by the same "signals") connected via a L298N, which is connected to the Arduino. In addition, I have a servo motor connected to the Arduino. ...
9
votes
4answers
9k views

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?
0
votes
1answer
149 views

SPI Overflow in 328 slave with i2c sensor

I am working on creating sensor poller that is going to be polling multiple sensors and then, on request, provides its data to the master. The master polls the slave (SPI) at 50hz and the slave is ...
4
votes
3answers
186 views

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(); } ...
3
votes
2answers
793 views

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 ...
1
vote
1answer
131 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 ...
0
votes
1answer
1k 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
1answer
4k 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
2answers
77 views

Logging without IDE

Is there a way to log events on Arduino when developing using C / AVR toolchain, and not the Arduino IDE? Working on Ubuntu.
1
vote
1answer
80 views

'Non-Deterministic' memory usage on Arduino

I had a problem with a memory leak in my sketch and cornered it with MemoryFree.h. This works great and I was able to fix my leak. My sketch is not really static, but My var sizes are. I observed, ...
1
vote
0answers
2k views

Sim800L HTTP post request stop working after a while

I am desperate to get my SIM800L module (http://www.ebay.co.uk/itm/SIM800L-GPRS-GSM-Module-Board-Quadband-QUAD-BAND-Antenna-for-MCU-Arduino-/321992759287) sending POST requests for a long period of ...
1
vote
1answer
1k views

Debugging with ISP

I would like to connect the Atmega328p chip to my desktop, through the USB, so I can run teraterm or hyperterminal for debugging purposes. I have already ordered a USB to TTL serial cable but it won'...
1
vote
0answers
85 views

Strange problem with serial communication

I'm developing a little project with Arduino, using a small web page to show data. Well, I have been develop the web page and the small code to communicate with Arduino board in my local computer and ...
1
vote
3answers
79 views

Problems stopping an if loop, and starting it as well

I want my code to run my motor for a specific amount of time at a specific speed and then stop and not do anything else. I'm having trouble here, I think with my switch and the if loops running on ...
5
votes
5answers
57k views

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 ...
0
votes
1answer
128 views

Diode lights generate false interruptions

I have spent quite a considerable time debugging my code that was triggering false interruptions. I have found out that the source of the error were the diode lights (on the picture). I would like to ...
0
votes
1answer
114 views

Mega pin stuck high after driving optocoupler

I have an Arduino Mega which is driving a board. On the board is a quad optocoupler (K847PH). Pins 42 - 45 of the Arduino are each attached to the Anode of a opto. The cathode goes to ground through a ...
0
votes
1answer
71 views

Wrong code ouput, when the specific function runs more than once

If I run the following code, I get the correct output, and the path is displayed on the serial monitor. However when I run the code together with the commented out portion (in the code below) I don't ...
0
votes
1answer
633 views

Why I could not read the other sms's except the first SMS?

I have to read the incoming SMS on my GSM module SIM900, and I want to print the sender number and message to the serial monitor. I first configure the GSM module with AT commands and Response() ...
0
votes
3answers
1k views

Self-diagnose components in the circuit

How can I tackle self-diagnosis problem within my Arduino project? For example, I have a temperature sensor and humidity sensor. How can I know if they work or not on Arduino start or inside the ...
1
vote
0answers
211 views

Intermittent wifi/hotspot connection

I have an Arduino Mega 2560 with a cc3000 Wifi shield that is sending messages to dweet.io. Here is the relevant portion of my code: // Post data to dweetio char data[125]; sprintf(data, "?t1=...
1
vote
2answers
9k views

How to read code from Arduino Uno to Arduino IDE? [duplicate]

we can upload a code into Arduino UNO from our computers, but how about reading code? Can we read and get C codes from compiled codes from Arduino hardwares? My second question is that will we read ...
0
votes
1answer
57 views

Will writing to serial when no serial is available cause problems?

I have an Arduino UNO, and use the serial for debugging purposes. What happens if I run the arduino on batteries and try to write to serial? Will the code stop running until a serial connection is ...
1
vote
1answer
106 views

Starting Off Low-Level Port Access

   I'm trying to teach myself some low[er] level code, but I just can't get it to work. I've tried OR-ing stuff in, AND-ing stuff in, and just straight up defining stuff, but it's not ...