Most Popular

1500 questions
22
votes
2 answers

How do I burn the bootloader?

I was instructed to "burn the bootloader" to my Arduino to fix an error I was getting. How can I do this? (And what exactly is the bootloader?)
The Guy with The Hat
  • 5,232
  • 7
  • 29
  • 51
22
votes
2 answers

Can two LEDs attached to different pins share their resistor?

I'm designing an Arduino style board with built-in LEDs for several of the pins. To simplify assembly of the board and save on components, I was wondering whether it would be safe for those LEDs to share a single resistor, as in this…
microtherion
  • 1,512
  • 8
  • 19
22
votes
5 answers

How much can I recurse? How much can I recurse? How much ca!@#QFSD@$RFW

The Arduino Uno board has limited RAM which means it has a limited call stack available. Sometimes, recursion is the only quick option to implement a certain algorithm. So, given that the call stack is severely limited, what would be a way to find…
asheeshr
  • 3,837
  • 3
  • 25
  • 61
22
votes
3 answers

Can a function be called automatically when an input changes?

Currently, my sketch is checking an input pin every time round the main loop. If it detects a change, it calls a custom function to respond to it. Here's the code (trimmed down to the essentials): int pinValue = LOW; void pinChanged() { …
Peter Bloomfield
  • 10,932
  • 9
  • 47
  • 87
22
votes
2 answers

What's the difference between a clone and a counterfeit Arduino?

I've been hearing a lot about clones and counterfeits. What are the differences between the two?
Anonymous Penguin
  • 6,285
  • 10
  • 32
  • 62
22
votes
5 answers

How to read and write EEPROM in ESP8266

I need to know how I can write integer values in EEPROM and retain the value on power on. char *Red = strstr(myTestUrl, "/R"); if (Red) { int RedValue = atoi(Red + 2); analogWrite(12, RedValue); Serial.println("Red :"); …
MICRO
  • 478
  • 1
  • 7
  • 20
22
votes
4 answers

Can ESP8266 replace Arduino?

I’m a hobbyist and have used Arduino so far for simple projects. Now I want to build a project involving addressable LEDs, I want to write several programs on the Arduino for the LEDs and on my phone I select which ones to run. I found ESP8266 as a…
ahmadx87
  • 539
  • 2
  • 9
  • 16
22
votes
2 answers

Why do some pins have a different PWM frequency?

According to the Arduino reference for analogWrite(), the PWM frequency on most pins is ~490 Hz. However, it's ~980 Hz for pins 5 and 6 on the Uno, and for pins 3 and 11 on the Leonardo. Why are these different? Is it a deliberate design feature, or…
Peter Bloomfield
  • 10,932
  • 9
  • 47
  • 87
22
votes
2 answers

Why can't I declare a class in another tab in Arduino IDE?

I wanted to move some of my code out into a second tab in the Arduino IDE, to keep things better organised. At first, I only tried moving a function, and it seemed to work fine. I could call the function from the setup() function in my main tab, and…
Peter Bloomfield
  • 10,932
  • 9
  • 47
  • 87
22
votes
3 answers

How to check my Arduino board is working or dead?

When you have a board in your hand but you don't know is it working or not, how to verify if it's working or dead?
Hardik Thaker
  • 1,407
  • 2
  • 12
  • 15
22
votes
2 answers

Reset an Arduino Uno in code

Is it possible to reset an Arduino (i.e., to reboot it) from code (i.e from the sketch itself)? I know that is possible with a special circuit but is there a chance to make it just with code? Below is my code and the comment //reset is where I want…
kimliv
  • 551
  • 1
  • 4
  • 17
21
votes
7 answers

Loading local libraries

I'm new to Arduino/C development (coming from a JavaScript/Ruby environment), but I was wondering if it was possible to include a library from a custom folder within a sketch? So this is my situation; project.ino libs/ MyNewLib/ MyNewLib.h …
Stefan
  • 311
  • 1
  • 2
  • 6
21
votes
3 answers

Arduino Pro Mini (3.3V version) input voltage range / tolerance

I have a few Arduino Pro Mini clones (cheap Chinese stuff) and would like to power them with 12V power supply (same as fan voltage). According to the Arduino Pro Mini spec the RAW pin can take 3.35-12V (3.3V model). In practice this means a 12V PSU…
DominicM
  • 597
  • 3
  • 7
  • 13
21
votes
4 answers

Compatibility between Arduino and Arduino clones

In a project I am using a Seeeduino v3.0 as an Arduino clone. On the seeeduino website it says that It is based on the Duemilanove schematic, 100% compatible to its existing program, shield and IDEs. In fact I never had any problems with shields…
A.Schulz
  • 467
  • 1
  • 6
  • 9
21
votes
4 answers

How can higher current devices (motors, solenoids, lights, etc.) be controlled by an Arduino?

I'm looking for a broadly applicable solution, one that can be adapted to a variety of projects. I'm currently working on several projects that each require controlling devices ranging from 800mA to 2A from an Arduino Uno. One controls stepper…
jlbnjmn
  • 978
  • 2
  • 9
  • 15