All Questions

Filter by
Sorted by
Tagged with
243 votes
13 answers
464k views

Can I program for Arduino without having a real board?

I would like to start the development of some basic Arduino projects but I don't own an Arduino board yet. Is there a way I can write my code and emulate/test it using a desktop computer so after my ...
totymedli's user avatar
  • 2,909
180 votes
21 answers
567k views

"avrdude: stk500_getsync(): not in sync: resp=0x00," aka Some Dude Named Avr Won't Let Me Upload My Program

I made an awesome program the other day, and I wanted to upload it to my Arduino. After clicking the upload button, some mean dude named avr came along and stopped me, saying: avrdude: ...
The Guy with The Hat's user avatar
132 votes
4 answers
106k views

How can I handle the millis() rollover?

I need to read a sensor every five minutes, but since my sketch also has other tasks to do, I cannot just delay() between the readings. There is the Blink without delay tutorial suggesting I code ...
Edgar Bonet's user avatar
  • 42.8k
105 votes
3 answers
111k views

Have I bricked my Arduino Uno? Problems with uploading to board

I can't upload sketches to my Arduino Uno. Have I "bricked" it? What steps can I take to work out what is wrong? What can I do to fix it?
Nick Gammon's user avatar
  • 38.1k
103 votes
9 answers
261k views

C++ vs. The Arduino Language?

What are the advantages of each language when using the Arduino? I'm thinking this is a good general question, but I'll add a bit about why I'm asking if anyone wants to give me a tip. I'm ...
Friend of Kim's user avatar
94 votes
22 answers
19k views

What are the other IDEs for Arduino?

The basic Arduino IDE lacks a lot of the sophistication present in other IDEs such as code completion, code collapsing, folder organisation, etc. Are there other IDEs that allow programming in C or C++...
DLJ's user avatar
  • 1,149
92 votes
7 answers
55k views

How to organize my Arduino projects' structure for easy source control?

It's been a long time I've been looking for a good answer to this question. Typically, any Arduino project but the simplest one will include: The main source code file MyProject.ino Libraries ...
jfpoilpret's user avatar
  • 9,122
81 votes
9 answers
180k views

How can I create multiple running threads?

Is there a way I can have multiple parts of the program running together without doing multiple things in the same code block? One thread waiting for an external device while also blinking a LED in ...
Bja's user avatar
  • 933
71 votes
12 answers
444k views

How do I split an incoming string?

I am sending a list of servo positions via the serial connection to the arduino in the following format 1:90&2:80&3:180 Which would be parsed as: servoId : Position & servoId : Position ...
ValrikRobot's user avatar
67 votes
2 answers
225k views

How do you use SPI on an Arduino?

With reference to the Arduino Uno, Mega2560, Leonardo and similar boards: How does SPI work? How fast is SPI? How do I connect between a master and a slave? How do I make an SPI slave? Please note: ...
Nick Gammon's user avatar
  • 38.1k
65 votes
13 answers
81k views

Is there a way to have more than 14 Output pins on arduino?

Is it possible to have more than 14 output pins on the Arduino, I am working on a project in which I need to light up several LEDs individually. I only have an Arduino Uno, and I don't want to get a ...
JVarhol's user avatar
  • 1,903
62 votes
7 answers
107k views

Is using malloc() and free() a really bad idea on Arduino?

The use of malloc() and free() seems pretty rare in the Arduino world. It is used in pure AVR C much more often, but still with caution. Is it a really bad idea to use malloc() and free() with ...
Cybergibbons's user avatar
  • 5,340
61 votes
7 answers
216k views

Is there any way to download a sketch from an Arduino?

I made a sketch, but then I lost it. However, I uploaded it to the Arduino before losing it. Is there any way I can get it back?
The Guy with The Hat's user avatar
61 votes
4 answers
263k views

What are the 5V and VIN pins for?

I believe I can supply the Arduino with power in three different ways: Use USB. The design trusts the 5V to be regulated, and does not regulate it in any way. Use a regulated power source, trusted ...
Mads Skjern's user avatar
  • 1,125
57 votes
4 answers
102k views

How high of a baud rate can I go (without errors)?

The standard is 9600 baud. That's just the standard. Using a Arduino Uno SMD R2, what is the highest practical baud rate I can achieve? Bonus points for the audacious: how would you go about creating ...
Anonymous Penguin's user avatar
53 votes
12 answers
271k views

How do I print multiple variables in a string?

Say I have some variables that I want to print out to the terminal, what's the easiest way to print them in a string? Currently I do something like this: Serial.print("Var 1:");Serial.println(var1); ...
sachleen's user avatar
  • 7,505
52 votes
2 answers
68k views

What happens if I power the Arduino with both the USB and external power voltage simultaneously?

I am a new Arduino user. I am not sure whether I can connect both USB and external supply through power adaptor to Arduino simultaneously. Would this burn the controller? Basically, I want to ...
Jagat's user avatar
  • 543
49 votes
11 answers
13k views

Is an Arduino capable of running 24/7?

I'm making a simple Arduino web server and I want to keep it turned on all the time. So it must endure to stay working continuously. I'm using an Arduino Uno with a Ethernet Shield. It's powered ...
Butzke's user avatar
  • 802
48 votes
17 answers
14k views

How to trigger an alarm when toilet paper is low?

Anyone with kids knows they never help with the toilet paper. Anyone know how to track when it's low or out and sound an audible alarm? I just don't know what sensor to use that may help. Some that ...
Jose Leon's user avatar
  • 735
48 votes
21 answers
141k views

Serial data plotting programs

I need to plot serial data from Arduino. I require support for: Various data formats (e.g. signed, unsigned, 8 bits, 16 bits); Plots several data on the same axes; Exports / Imports file data. As ...
akellyirl's user avatar
  • 2,146
47 votes
11 answers
151k views

Mac OSX Yosemite no serial ports showing for Uno R3

I have a MacBook Pro running OS X Yosemite (10.10.3). I connected my Arduino UNO R3 to my computer for the first time after the Yosemite upgrade - it worked fine before this! When I opened the ...
revive's user avatar
  • 571
45 votes
5 answers
156k views

What is the difference between Serial.write and Serial.print? And when are they used?

What is the difference between Serial.write and Serial.print? And when are they used? Both have been used to print on serial monitor, what are their actual differences?
shadab's user avatar
  • 569
44 votes
4 answers
10k views

What are (or how do I use) the power saving options of the Arduino to extend battery life?

For solar & battery powered projects, decreasing power consumption is a necessity. I know a little bit about using a timer and interrupt to put the microcontroller into sleep when it isn't doing ...
sachleen's user avatar
  • 7,505
44 votes
4 answers
49k views

Why does starting the serial monitor restart the sketch?

If I upload any sketch that sends serial data, I immediately see the TX/RX LEDs flash once the sketch is uploaded. If I then start the serial monitor, the sketch appears to restart. A bare minimum ...
Cybergibbons's user avatar
  • 5,340
43 votes
2 answers
41k views

Warning when verifying sketch with VS code

I use Visual Studio Code to develop for arduino which uses Arduino Studio installed files and needs the installation to work. This works very well. Annoying is that when verifying a sketch it takes ...
Uwe Hafner's user avatar
43 votes
5 answers
23k views

Serial.begin(): Why not always use 28800?

In a lot of the sample code online people add the line Serial.begin(9600) in the setup block. When I look up what Serial.begin() is on the official documentation, it says that it controls the bit per ...
Fraïssé's user avatar
  • 895
42 votes
5 answers
47k views

Difference between Arduino.cc and Arduino.org

Recently I have noticed that there are two arduino sites, arduino.cc and arduino.org. They both have the Arduino logo and both sell what seems to be official Arduino boards. Also, arduino.org came ...
NULL's user avatar
  • 810
41 votes
10 answers
177k views

Programming an Arduino using Python, rather than C/C++

I am not very skilled with the C Language and I was wondering if there is a way in which python could be used to program an Arduino. This would most likely require a different IDE in order to be able ...
JVarhol's user avatar
  • 1,903
40 votes
12 answers
147k views

Arduino Nano uploading gives error: avrdude: stk500_recv(): programmer is not responding

I have a Arduino Nano (Sainsmart) that I'm trying to upload a sketch to. Under the Arduino IDE, the device selected was Arduino Nano w/ ATmega328. However uploading the sketch gives me the error ...
Nyxynyx's user avatar
  • 1,389
35 votes
12 answers
164k views

How can I connect to an Arduino using WiFi?

I'm working on building a solar powered, Arduino based weather station. The weather station consists of a temperature sensor and a photoresistor, and I plan to add an anemometer in the future. I would ...
jlbnjmn's user avatar
  • 978
35 votes
6 answers
57k views

How to get HTTPS on Arduino?

Put plainly: is there a way to get an HTTPS connection on the Arduino? I have been looking in to it, and I have found it is impossible with the standard library and the Ethernet shield, but is there ...
TheDoctor's user avatar
  • 3,469
34 votes
2 answers
69k views

What are the AREF, IOREF, and the unlabeled pin next to IOREF on the Uno R3?

There are some pins on the Arduino which I haven't been able to find out anything about: IOREF AREF An unlabeled one next to IOREF What are they?
tbodt's user avatar
  • 443
33 votes
14 answers
57k views

Most compact method of powering Arduino from wall socket

There are a lot of methods to power an Arduino from a large range of voltages: USB cable from PC or from a phone charger or an USB hub step down converters step up converters switching power supply ...
vlad b.'s user avatar
  • 719
32 votes
5 answers
25k views

What does it take to compile Linux on Arduino, if at all possible?

Is it possible to run Linux on Arduino? If yes, what steps and limitations need to be considered? If not, what are the limitations that prevent this?
Jakub Arnold's user avatar
32 votes
2 answers
40k views

How does the Arduino handle serial buffer overflow?

How does the Arduino handle serial buffer overflow? Does it throw away the newest incoming data or the oldest? How many bytes can the buffer hold?
user avatar
31 votes
1 answer
55k views

Whats the difference between RF options (wifi, xbee, NRF24L01)

When doing RF, you have many options. Three of the most basic are in the title box WiFi Xbee NRF24L01 What are the practical differences in using them. What is the purpose of each other and the pros ...
user1584421's user avatar
  • 1,395
31 votes
4 answers
58k views

Is it better to use #define or const int for constants?

Arduino is an odd hybrid, where some C++ functionality is used in the embedded world—traditionally a C environment. Indeed, a lot of Arduino code is very C like though. C has traditionally used #...
Cybergibbons's user avatar
  • 5,340
30 votes
4 answers
81k views

What can I do if I run out of Flash memory or SRAM?

According to the Arduino documentation, the ATmega328 has 32KB of Flash memory for the bootloader + uploaded sketch, and only 2KB SRAM for runtime data. The ATmega2560 has quite a bit more, totalling ...
Peter Bloomfield's user avatar
30 votes
6 answers
56k views

How to compile, upload and monitor via the Linux command line?

Interfacing an Arduino Uno (uploading etc.) with the Arduino IDE (using the Fedora package) works fine under Fedora 21. But I rather want to use vim + make + vim-quickfix-mode etc. How can I do that?...
maxschlepzig's user avatar
30 votes
2 answers
66k views

Arduino as USB HID

Is it possible to build a HID device (like a keyboard) using an Arduino uno? At the time being, I have button inputs on the Arduino giving outputs on the serial line. So, how can I transform my ...
Stuyvenstein's user avatar
29 votes
8 answers
19k views

Are global variables evil in Arduino?

I'm relatively new at programming and many of the coding best practices I'm reading effectively state that there are very few good reasons to use a global variable (or that the best code has no ...
ATE-ENGE's user avatar
  • 921
29 votes
8 answers
38k views

How can I get a unique ID for all my Arduino boards?

Once you have uploaded a sketch to one of your Arduino boards, it is hard to know exactly what source code led to that sketch. Indeed, you may change the source code of your sketch on your PC without ...
jfpoilpret's user avatar
  • 9,122
28 votes
3 answers
127k views

What is Serial.begin(9600)?

I know that this is to initialize something: Serial.begin(9600); But I want to know what it really means?
shajib0o's user avatar
  • 531
27 votes
5 answers
113k views

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 ...
user avatar
27 votes
2 answers
10k views

Arduino USB Power vs External Power Supply

Why is the Arduino able to accept ~5V from the USB, but requires a min of 7V when using an external power supply?
Nyxynyx's user avatar
  • 1,389
26 votes
3 answers
6k views

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 ...
Peter Bloomfield's user avatar
25 votes
14 answers
6k views

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 ...
sachleen's user avatar
  • 7,505
25 votes
1 answer
42k views

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 ...
marlar's user avatar
  • 467
25 votes
5 answers
42k views

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 ...
Marlon Abeykoon's user avatar
25 votes
3 answers
148k views

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 ...
acpilot's user avatar
  • 643

15 30 50 per page
1
2 3 4 5
494