Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [debugging]

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

0
votes
1answer
20 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
31 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 ...
0
votes
1answer
74 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
59 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
808 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
31 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? #...
0
votes
0answers
48 views

Do you know if VisualGDB, addon of VS2017, debug with JTAG really work?

Do you have an experience of VisualGDB debug with arduino JTAG? My target is ESP32/8266, is-it working well (dynamic breakpoint, viewing of all variable, step by step...) ? Is it fast enough to be ...
1
vote
0answers
31 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
118 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
1k 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
227 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
117 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
45 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
92 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
186 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
0answers
30 views

Hackduino Serial Communication

Hey guys wanted to ask if its possible to establish a serial connection if I connect io pin 0 and 1 of my hackduino to my uno board I want to use this for debug purposes (just spitting out different ...
0
votes
1answer
1k 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
357 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
270 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
0answers
31 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
228 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(); ...
0
votes
0answers
235 views

error compiling in visual studio

i downloaded VS to debug my codes but it gives me an error while using the registers for example 'UBRR0H' was not declared in this scope 'TXEN0' was not declared in this scope i have an arduino uno......
1
vote
1answer
570 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. ...
8
votes
4answers
6k 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
138 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 ...
5
votes
3answers
171 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(); } ...
2
votes
2answers
417 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
117 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
1k 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
74 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
68 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
875 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
70 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
74 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 ...
2
votes
4answers
23k 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
116 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
87 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
69 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
524 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
811 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
198 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
7k 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
56 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
103 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 ...
2
votes
1answer
435 views

What protocols and tools does Arduino Due use for flashing and debugging?

I am interested in writing a simple C program outside of the Arduino IDE and respective libraries, but deploying it directly to an Arduino Due (which uses a SAM3X8E ARM MCU). I am trying to figure out ...
8
votes
1answer
506 views

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 ...
1
vote
1answer
205 views

How to fix error line number offset in Sublime Text when compiling for Arduino

When compiling for Arduino via the Stino plugin line numbers are not represented correctly in the output. For example, I have an error on line 117 however the output is: sketch_name.ino.cpp:136:1: ...
2
votes
1answer
692 views

Am I Running Out of RAM Or Not?

I'm attempting to drive 300 TM1803 RGB LEDs from an Arduino Uno using the FastLED library. My code works fine for 100 LEDs, but when I go to 150, the arrays that store LED values and my sensor data ...