Most Popular

1500 questions
26
votes
3 answers

What happens to the Arduino if you don't use a resistor with an LED?

Making a blinking light seems to be one of the most common beginner projects with Arduino. A typical approach is to connect an LED + resistor (in series) to an IO pin, and connect the other end to ground. In code, you make the pin an output, and…
Peter Bloomfield
  • 10,932
  • 9
  • 47
  • 87
25
votes
14 answers

Project Showcase '14

The logo is a derivative of the Arduino Community Logo licensed under Creative Commons license CC-SA-BY-NC 3.0 Update: Winners Announced The winners of the contest have been announced. Please see the Meta post for details. To celebrate 10 years…
sachleen
  • 7,525
  • 4
  • 39
  • 57
25
votes
3 answers

NodeMCU - Vin pin as 5V output?

I know that Vin can be used to power the board but have also been reading that it can be used as a 5V output. Is it possible to assign Vin as an output as I would any other GPIO? If I want to power an LED from GPIO 12, I would assign GPIO: const int…
acpilot
  • 643
  • 2
  • 12
  • 25
25
votes
1 answer

What is the frequency of PWM output on Arduino

What frequency do Arduinos use for normal PWM when you use analogWrite()? And is it different for different Arduino model? I'm interested specifically in the Mega 2560, but also want to know if it's consistent between models. I've seen a passing…
Duncan C
  • 5,682
  • 3
  • 17
  • 29
25
votes
5 answers

What is the real lifetime of EEPROM?

ATMEL says the cell lifetime of an EEPROM cell is about 100,000 write cycle/ cell. Is this actually how the EEPROM performs in the wild? If I do not change the value of a cell, does this stress the lifetime? For example, if I write the value 0xFF to…
Marlon Abeykoon
  • 353
  • 1
  • 7
  • 12
25
votes
1 answer

ATtiny85: Power consumption vs clock speed

Short and simple: What is the power consumption for an ATtiny85 running at 1 MHz and 8 MHz using the internal clock? Not using any sleep modes. I have googled a lot and can't find any info on this. I ask because I want to know if it is worth using 1…
marlar
  • 467
  • 1
  • 6
  • 10
23
votes
12 answers

What type of connector does the GROVE system use?

What type of connector does GROVE use? I'm interested in wiring some old sensors so they're compatible with GROVE, so I first need to identify the connector so I can buy the housing and pins to crimp. It looks to be some type of JST connector, but…
Cerin
  • 1,618
  • 2
  • 24
  • 41
23
votes
4 answers

Communication Protocol Best Practices and Patterns

Every time I design a serial protocol to be used between two arduinos, I feel a bit like I'm reinventing a wheel. I wonder if there are any best practices or patterns people follow. This question is less about the actual code, but more about the…
Jeremy Gillick
  • 481
  • 1
  • 3
  • 8
23
votes
3 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
  • 331
  • 1
  • 2
  • 6
23
votes
4 answers

Why use an int variable for a pin when const int, enum or #define makes much more sense

Why do people use a variable to specify a pin number when the pin is unlikely to change throughout the execution of the code? Many times I see an int being used for a pin definition, int led = 13; when the use of a const int const int led = 13; or…
Greenonline
  • 2,938
  • 7
  • 32
  • 48
22
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,932
  • 9
  • 47
  • 87
22
votes
10 answers

How to identify Arduino Mini Pro 5v vs 3.3v

I have many Arduino Mini Pro, every from different seller. Few are 3.3v and most 5v. I had to clean table for Xmas and now I do not have any idea how to identify 3.3v Arduinos. They do not have any marks. I bought them on ebay. I know 3.3v has 8mhz…
Max
  • 323
  • 1
  • 2
  • 5
22
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,932
  • 9
  • 47
  • 87
22
votes
1 answer

How to access multiple SPI interfaces on Arduino

I have worked on SPI devices connected with an Arduino one at a time. How do I work with two different SPI devices at the same time?
22
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,350
  • 7
  • 33
  • 51