Questions tagged [debugging]
The process of finding and resolving problems ('bugs') in a hardware and/or software system.
92
questions
1
vote
1
answer
1k
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
4
answers
15k
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
1
answer
217
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
3
answers
257
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
2
answers
3k
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
1
answer
167
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 ...
2
votes
1
answer
2k
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
1
answer
6k
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
2
answers
126
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
1
answer
106
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, ...
2
votes
0
answers
3k
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
1
answer
3k
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'...
2
votes
0
answers
103
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
3
answers
91
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 ...
16
votes
6
answers
168k
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
1
answer
159
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
1
answer
180
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
1
answer
83
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
2
answers
842
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
3
answers
2k
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 ...
2
votes
0
answers
223
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
2
answers
13k
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
1
answer
68
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
1
answer
122
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
1
answer
763
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 ...
9
votes
1
answer
1k
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
1
answer
277
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
1
answer
1k
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 ...
1
vote
1
answer
763
views
I2C hookup - sketch just crashes
I am encountering problems with I2C when trying to attach a 9DoF Sensor to my Arduino Uno. Following these instructions (the hardware setup I have is like in the schematic) I noticed the basic example ...
0
votes
1
answer
311
views
How do I write a debugger for Arduino?
I want to write my own debugger.
I've found Visual Micro plugin for Visual Studio provides Arduino Debug.
So, does anyone have ideas how it works?
I just desire make the same plugin in Eclipse IDE.
0
votes
3
answers
75
views
Why is this spitting giberish instead of serial numbers?
#include <TrueRandom.h>
void setup() {
char* ss= (char*)TrueRandom.random(111111111,999999999);
char* finalss;
Serial.begin(9600);
finalss[0] = ss[0];
finalss[1] = ss[1];
finalss[2] ...
0
votes
1
answer
58
views
Arduino - Progamming issue
my first post here.
Anyway I'm working on a Simon Says game.
I have a weird bug with the function that reads button input.
This is the code:
int deBounce(int count){
int pressed=-1;
int ...
2
votes
1
answer
3k
views
Issue with adding a library: No such file or directory
I downloaded a Library called "Morse" which I got from the Arduino website:
http://arduino.cc/en/Hacking/LibraryTutorial
(all the way at the bottom of the page there is a link called Morse.zip)
And ...
1
vote
1
answer
666
views
Arduino hangs after 3-4 minutes on battery power, but not on USB
I have a simple sketch running on a BE Leonardo-compatible board.
It reads input from a potentiometer, and outputs to two RGB LEDs which change colour over time - in a different pattern if certain ...
2
votes
2
answers
101
views
Extract arduino collected data periodically
I'd like to extract data collected by a battery powered arduino for example once a day without stopping it and not using SD card.
It's posible, when I want to extract the collected data, to connect a ...
1
vote
2
answers
1k
views
Debugger for Code::Blocks + Arduino
I am not very experienced in this, but I was wondering if Code::Blocks has a way of getting a debugger that runs for Arduino chips, specifically. I understand there is Arduino IDE for but does it ...
2
votes
1
answer
1k
views
Why is Arduino STINO upload function not working?
I'm using sublime text for editing and modifying my arduino libraries. Sublime text is pretty pretty, useful and embed a very powerfull plugin system. Someone created an Arduino plugin for it. The ...
1
vote
1
answer
859
views
What is the capability of AVRISP and USBASP on ATMega48, 328, 2560?
For use with ATMega 48 (old Arduino?), 328 (UNO, Pro Mini) and 2560 (Mega2560) chips, what is the capability for the AVRISP and USBASP programmers on:
Can it read, write fuse?
Can it read, write ...
4
votes
1
answer
9k
views
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 ...
1
vote
1
answer
3k
views
Debugging i2C from Mac OSX desktop
I have a raspberryPi and Arduino connected via i2C. On the RPi I have a python script that takes int values and simply sends them to the RPi, which in turn echoes them back. I am trying to debug this, ...
1
vote
3
answers
5k
views
Why does my wired button always read HIGH?
I have made a simple Arduino program that uses a potentiometer to dim a LED.
This program also makes a second LED blink.
Finally, I have added a button that controls a third LED; this part of my ...
5
votes
2
answers
6k
views
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 ...