Most Popular
1500 questions
27
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,752
- 3
- 19
- 30
27
votes
5 answers
First time set up- permission denied to usb port- ubuntu 14.04
I just plugged my arduino in and the light is on, but the blink test failed to upload. here is my error:
Arduino: 1.6.7 (Linux), Board: "Arduino/Genuino Uno"
Sketch uses 1,030 bytes (3%) of program storage space. Maximum is 32,256 bytes.
Global…
user18719
27
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
- 487
- 1
- 6
- 10
26
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
- 653
- 3
- 13
- 26
26
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
- 363
- 1
- 7
- 12
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,982
- 9
- 48
- 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,565
- 5
- 40
- 57
24
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
- 341
- 1
- 2
- 6
24
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
- 3,152
- 7
- 36
- 48
23
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,982
- 9
- 48
- 87
23
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,292
- 7
- 30
- 51
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
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.
- 749
- 2
- 7
- 13
23
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
- 500
- 1
- 8
- 20
23
votes
4 answers
List of Arduino board preprocessor #defines
When one selects a board within Arduino IDE, a preprocessor definition is added to one of the behind-the-scenes files.
After a lot of hunting and some good fortune I found that the format of this definition is:
#define…
CharlieHanson
- 1,430
- 1
- 11
- 25