Most Popular

1500 questions
21
votes
5 answers

What overheads and other considerations are there when using a struct vs a class?

C on embedded systems has traditionally use structs to hold structured data. Arduino brings C++ to the table, so we can use classes instead. Lets say we have two different data structures which could be considered very similar: typedef struct { …
Cybergibbons
  • 5,230
  • 7
  • 32
  • 50
21
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
  • 4,962
  • 7
  • 28
  • 51
21
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,492
  • 8
  • 19
21
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
  • 519
  • 1
  • 9
  • 16
21
votes
3 answers

Classes and objects: how many and which file types do I actually need to use them?

I have no previous experience with C++ or C, but know how to program C# and am learning Arduino. I just want to organize my sketches and am quite comfortable with the Arduino language even with its limitations, but I really would like to have an…
heltonbiker
  • 503
  • 4
  • 21
20
votes
2 answers

Is there a limit on how much current a pin can sink?

I've been experimenting with an 8x8 LED matrix controlled by an Arduino Uno. As I think is typical, the matrix uses a common anode for each row, and a common cathode for each column. At the moment, I've got all the matrix pins connected directly to…
Peter Bloomfield
  • 10,842
  • 9
  • 46
  • 87
20
votes
2 answers

Why can't I upload a sketch while other components/devices are connected to my Uno?

I wanted to make a fairly simple circuit which would flash a series of LEDs in sequence, using my Arduino Uno (more specifically, a SainSmart clone). I wrote my sketch and it compiled fine. After that, I connected 8 LEDS+resistors to pins 0 through…
Peter Bloomfield
  • 10,842
  • 9
  • 46
  • 87
20
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
  • 577
  • 3
  • 7
  • 13
20
votes
8 answers

In Linux, how to identify multiple Arduinos connected over USB?

If I have multiple Arduinos connected over USB to a Linux computer, and they show up as /tty/ACM0 /tty/ACM1 /tty/ACM2 How can I identify which Arduino is which without connecting to them via serial connection? Is there a serial number or a…
vlad b.
  • 709
  • 2
  • 7
  • 13
20
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,155
  • 9
  • 31
  • 62
20
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
  • 458
  • 1
  • 7
  • 20
20
votes
2 answers

Asynchronous function calls in Arduino sketch

In an Arduino sketch, is there a way to make asynchronous function calls within the loop? Like listening to requests through http server and process them in a non-blocking way.
Jacer Omri
  • 301
  • 1
  • 2
  • 6
20
votes
2 answers

How many interrupt pins can an Uno handle?

I am looking at using a 7 channel RC receiver with the Arduino Uno R3. In the documentation, there are mentions of a maximum of 2 interrupt pins, whereas on certain other blogs I have seen mentions of using upto 20 pins as interrupts, with…
asheeshr
  • 3,687
  • 3
  • 24
  • 61
20
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,377
  • 1
  • 11
  • 15
19
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
  • 291
  • 1
  • 2
  • 6