Questions tagged [arduino]

ARDUINO QUESTIONS MUST BE PROGRAMMING RELATED. Arduino is an open-source electronics prototyping platform based on easy-to-use hardware and software. Questions should relate to programming Arduinos only (as in contain code). General Arduino questions may be asked on https://arduino.stackexchange.com or https://forum.arduino.cc

There is now an Arduino specific Q&A board under the Stack Exchange network, at https://arduino.stackexchange.com It is recommended you ask your questions there, as it covers all Arduino project questions, and not just coding related issues.

Arduino refers to both the hardware (single boarded micro-controller) and the software (a minimized IDE based on the Processing IDE) which makes hardware prototyping simple and engaging for people with little or no programming experience.

Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It's intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments.arduino.cc

Coding Arduino is simplified by the "Wiring based language", helper functions and handling of code behind the scenes (via AVR Libc and avrdude). Because "The Wiring Language" adds just a thin layer on top of C++ advanced users can use their preferred C/C++ IDE alternatively.

Picture of the Arduino Uno board

"The Arduino Uno is a microcontroller board based on the ATmega328 (datasheet). It has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz ceramic resonator, a USB connection, a power jack, an ICSP header, and a reset button. It contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable or power it with a AC-to-DC adapter or battery to get started." more details on the Arduino Wiki

Arduino is open-source, meaning that anyone can manufacture a compatible board and the official site offers detailed instructions. Similar projects include:

There are also similar pin compatible versions such as:

If the question is not programming related then it may be on-topic at Raspberry Pi Stack Exchange, Internet of Things Stack Exchange or Unix & Linux Stack Exchange.

19255 questions
224
votes
20 answers

How can I unit test Arduino code?

I'd like to be able to unit test my Arduino code. Ideally, I would be able to run any tests without having to upload the code to the Arduino. What tools or libraries can help me with this? There is an Arduino emulator in development which could be…
Matthew Murdoch
  • 30,874
  • 30
  • 96
  • 127
171
votes
40 answers

Arduino Sketch upload issue - avrdude: stk500_recv(): programmer is not responding

I have an Arduino Duemilanove with an ATmega328. I am working on Ubuntu 12.04 (Precise Pangolin), and the Arduino IDE's version is 1.0. Recently, I tried to upload a few of the sample sketches onto it, such as the Blink one. However, none of my…
Pastafarian
  • 2,080
  • 4
  • 18
  • 22
130
votes
6 answers

Mapping a numeric range onto another

Math was never my strong suit in school :( int input_start = 0; // The lowest number of the range input. int input_end = 254; // The largest number of the range input. int output_start = 500; // The lowest number of the range output. int…
Joe
  • 2,223
  • 4
  • 18
  • 13
127
votes
7 answers

HTTP vs TCP/IP, send data to a web server

I'm currently working on a project where I need to use an Arduino Nano (http://arduino.cc/en/Main/arduinoBoardNano) to send data from a temperature sensor to a web server. At first I thought it would be easy, since there are so many great libraries…
Adam
  • 8,752
  • 12
  • 54
  • 96
126
votes
10 answers

How to convert int to string on Arduino?

How do I convert an int, n, to a string so that when I send it over the serial, it is sent as a string? This is what I have so far: int ledPin=13; int testerPin=8; int n=1; char buf[10]; void setup() { pinMode(ledPin, OUTPUT); …
user947659
  • 2,485
  • 4
  • 21
  • 24
87
votes
5 answers

Converting an int or String to a char array on Arduino

I am getting an int value from one of the analog pins on my Arduino. How do I concatenate this to a String and then convert the String to a char[]? It was suggested that I try char msg[] = myString.getChars();, but I am receiving a message that…
Chris
  • 5,485
  • 15
  • 68
  • 130
79
votes
9 answers

How do I remove a library from the arduino environment?

In the Arduino GUI on windows, if I click on Sketch --> Import Library, at the bottom of the menu there is a section called "Contributed". Unfortunately, I had misclicked and added a library I did not want to that list. How can I remove it from that…
merlin2011
  • 71,677
  • 44
  • 195
  • 329
77
votes
15 answers

Convert serial.read() into a usable string using Arduino

I'm using two Arduinos to sent plain text strings to each other using NewSoftSerial and an RF transceiver. Each string is perhaps 20-30 characters in length. How do I convert Serial.read() into a string so I can do if x == "testing statements",…
Joe
  • 2,223
  • 4
  • 18
  • 13
72
votes
7 answers

Arduino Nano - "avrdude: ser_open():system can't open device "\\.\COM1": the system cannot find the file specified"

I am working with an Arduino Nano. avrdude: ser_open(): system can't open device "\.\COM1": the system cannot find the file specified This error appears just after uploading the program on the Arduino board. I have checked my port in my device…
user4018137
  • 721
  • 1
  • 5
  • 3
70
votes
2 answers

Does Arduino use C or C++?

I see in one place that Arduino uses 'standard' C, and in another that it uses 'standard' C++, so on and so forth. Which is it?
memilanuk
  • 3,522
  • 6
  • 33
  • 39
67
votes
4 answers

Arduino sprintf float not formatting

I have this arduino sketch, char temperature[10]; float temp = 10.55; sprintf(temperature,"%f F", temp); Serial.println(temperature); temperature prints out as ? F Any thoughts on how to format this float? I need it to be a char string.
Mistergreen
  • 1,052
  • 1
  • 8
  • 16
60
votes
7 answers

Vectors in Arduino

I am making a vector of "waypoints" on the Arduino. Each waypoint is an object. The Arduino will obviously need to store multiple waypoints for waypoint navigation. But instead of storing these waypoints in a standard preprogrammed array, the user…
jakebird451
  • 2,288
  • 4
  • 30
  • 45
60
votes
4 answers

Is there a way to "compile" Python code onto an Arduino (Uno)?

I have a robotics type project with an Arduino Uno, and to make a long story short, I am experimenting with some AI algorithms. However, I need to implement some high level matrix algorithms that would be quite simple using NumPy/SciPy, but they are…
Alex Eftimiades
  • 2,527
  • 3
  • 24
  • 33
58
votes
6 answers

How can I use a C++11 to program the Arduino?

How can I use C++11 when programming the Arduino? I would be fine using either the Arduino IDE or another environment. I am most interested in the core language improvements, not things that require standard library changes.
walrii
  • 3,472
  • 2
  • 28
  • 47
57
votes
18 answers

Arduino Tools > Serial Port greyed out

I am running Debian 7 (Linux Crunchbang) and wanted to use The Arduino IDE to program my Arduino UNO. To do that I installed the package arduino. When I started the Arduino I was asked to add my user to the dialout group. So I did with sudo usermod…
Moonlit
  • 5,171
  • 14
  • 57
  • 95
1
2 3
99 100