10 votes
Accepted

Arduino UNO hangs without visible reason

@Michel Keijzers provided overall answer. And now probable cause: char * GetEmptyLine(int width) { char * line = new char[width + 1]; In the Menu.cpp. There is no single delete in the code at all....
KIIV's user avatar
  • 4,752
7 votes

Arduino UNO hangs without visible reason

I wouldn't assume by default that it's a hardware problem. It seems like a software problem, and there can be many reasons that the Arduino hangs, e.g.: Too little stack space Too little heap space ...
Michel Keijzers's user avatar
4 votes
Accepted

Structure Array Initialization

As explained in Michel Keijzers' answer, you cannot use the = operator to assign something to a string (a character array). However, you can initialize a string using =. There is an important ...
Edgar Bonet's user avatar
  • 43.1k
4 votes

Reset an Arduino Uno in code

In case you have the original Arduino bootloader which you want to execute as a part of the reset, you can do a SW reset by jumping to the bootloader reset address (0x7800 on ATmega328p boards) void ...
Dmitry Grigoryev's user avatar
4 votes
Accepted

Writing your own Arduino flashing tool

This application already exists. It's called AVRDUDE: http://www.nongnu.org/avrdude/ You can download it compiled for Windows at the link above. This is the very flashing tool that the Arduino IDE ...
per1234's user avatar
  • 4,098
4 votes

How to automatically reset the NRF24L01 module

This is a known problem with those chips (especially Chinese clones). It is caused when a chip gets stuck in TX mode waiting for an ACK that never arrives back. The chips don't have a "reset", but ...
Majenko's user avatar
  • 105k
3 votes
Accepted

Is it possible to use Serial window for debug statements while using the hardware serial port for GPS module?

Is it possible to print the debug statements in the Serial window while the GPS module is connected to the hardware serial ports? Yes, that works. If you connect the Arduino TX pin 1 to the GPS RX, ...
slash-dev's user avatar
  • 2,029
3 votes

Use an Arduino to "intercept" transparently serial communication to Grbl?

I finally solved my problem by buying an Arduino Due! It was a problem of speed, not of code. The Uno is just not powerfull enough to read an write to Software Serial at 115200 Bauds, or even 9600, ...
BernardG's user avatar
  • 175
3 votes
Accepted

Software I2C - sending data

The main problem seems to be, that you are not adhering to the MCP's communication protocol. You just try to directly and only send the pure analog measurement to it. Look at this image from page 18 ...
chrisl's user avatar
  • 16.3k
3 votes
Accepted

Can someone help me decipher the code for the arduino? I am totally lost

Not really a physics question, but I will answer anyway. loop() is the standard Arduino function which contains code that the microprocessor runs repeatedly (as opposed to code in setup() which is ...
gandalf61's user avatar
  • 166
2 votes

Programming options other than C++

I'm surprised that nobody has mentioned AVR Assembly! Assembly is not often thought to be the most interesting, or even an easy method of programming, but it's nonetheless, 100% possible with all AVR ...
tuskiomi's user avatar
  • 205
2 votes

Problem with Software Serial: no response

SoftwareSerial cannot transmit and receive at the same time. So even if you connected pin 8 to 9 with a wire, your sketch will not receive what was transmitted. That's a guess without your wiring ...
slash-dev's user avatar
  • 2,029
2 votes

Is there a way of turning a computer into a Arduino type board?

You could simply opt for a different platform? A Raspberry Pi or Beagle Bone? Either would probably have enough processing power and ram. The Onion Omega2 is a SoC with a 400Mhz CPU, 64MB of DDR2 RAM, ...
Terry Wendt's user avatar
2 votes

analogRead over a certain time

The simplest and crudest method: int val1 = analogRead(A0); delay(5); int val2 = analogRead(A0); if (val2 > val1) { // It went up (for example). }
Majenko's user avatar
  • 105k
2 votes

Can't get constant reading with load cells

Assuming everything is hooked up correctly, your issue is likely related to electromagnetic noise (aka electromagnetic interference, EMI). Load cells output very small voltages, which is why you need ...
beak90's user avatar
  • 21
2 votes

Is there a way of turning a computer into a Arduino type board?

A regular Arduino uses an AVR, more "pimped" Arduino might go to ARM. Some special versions of Arduinos uses other chips, such as the ever iconic ESP8266. For home automation, an ESP8266 is WAY ...
Dat Ha's user avatar
  • 2,913
2 votes

Arduino UNO hangs without visible reason

Using string literals wastes precious RAM. To avoid this you can use the F macro. That way the string is stored in flash memory only. If by freeing up that extra RAM your program doesn't crash or ...
atland's user avatar
  • 179
2 votes

Printing transmission data from nRF24L01+

printf_P(PSTR("OBSERVE_TX=%02x: PLOS_CNT=%x ARC_CNT=%x\r\n")); This should be printf_P(PSTR("OBSERVE_TX=%02x: PLOS_CNT=%x ARC_CNT=%x\r\n"), OBSERVE_TX, PLOS_CNT, ARC_CNT); Where the two ...
Michel Keijzers's user avatar
2 votes

Adafruit Feather 32u4 BLE compatible with Software SPI?

Read SparkFun's guide, Serial Peripheral Interface (SPI), especially the multiple slaves section: Multiple slaves There are two ways of connecting multiple slaves to an SPI bus: In general, each ...
Greenonline's user avatar
  • 2,949
2 votes
Accepted

Motor isnt spinning when using L298N motor controller

You need two supply voltages for this board to work: motor supply, which goes directly to your motor (up to 35V for this L298N board, depends on what your motor needs), and logic supply of 5V, which ...
AnT stands with Russia's user avatar
2 votes

How to automatically reset the NRF24L01 module

Same issue; Simple work-around did it for me: (1) supply +3.3V power the nRF24L01 from a digital pin, using a forward bias diode/LED (with Vf in range 1.7-2.3V) to reduce voltage to compliant range (2....
jxb's user avatar
  • 21
2 votes

"expected primary-expression before '.' token" in debug code

In short: you have your macro backwards. Macros are not formed as "Take this set of commands and call it X" but "Make this macro X and have it equate to this set of commands". Where you have: #...
Majenko's user avatar
  • 105k
1 vote

Can't you easily use "quadrature" incremental rotary encoders at 2X or 4X their number of "stops"?

Maybe the encoder you got is being incorrectly described? I have a handful of the little thru-hole rotary encoders popular in Arduino module kits and they have 12 detents for one rotation, but they ...
jose can u c's user avatar
  • 6,974
1 vote

GPRS Based OTA to the NODEMCU

Download the bin file over GPRS and then use the Update singleton object. It is declared in Update.h. Example is ArduinoOTAClass::_runUpdate() in ArduinoOTA.cpp or ESP8266HTTPUpdate::runUpdate() in ...
Juraj's user avatar
  • 18.1k
1 vote

Pulse counter to measure flow-rate: 0 Pulse issues

Fixed, wow. Sometimes typing out your problem helps answer the question. Resistor position was wrong, and adjusting the Vin wire.
SwankyTigers's user avatar
1 vote

Arduino Square Wave Phase Shift by 270 degrees

The Arduino can only shift across a range of 180 degrees in CTC-mode using a 16 bit Timer. If you shift one channel to 90 degrees (other OCR set to 1, not zero) and then add a logic-inverter, you'll ...
stockvu's user avatar
  • 11
1 vote
Accepted

Arduino Uno and Arduino Yun software. Which version of the IDE works with both best?

The Yun startup was written when the normal IDE didn't support the yun, so you had to use a release candidate of a future version. Those days are long gone. Always use the latest version of the IDE.
Majenko's user avatar
  • 105k
1 vote

Can I run arduino on Windows Embedded Compact 2013?

What OS is running on two different devices exchanging messages/signals, does not matter. What matters is the protocol. You can use a lot of different ones: Wireless: IR (infrared) RF (radio), ...
Michel Keijzers's user avatar
1 vote

Problem with Software Serial: no response

I built two scetch for testing. One for Arduino Nano no1 and another for Arduino Nano no2. They are tested and working, not only written to this page. No2 is sending "hello" and No1 is ...
Mistofeles's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible