Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [arduino-ide]

This is for questions about the official IDE. The open-source IDE makes it easy to write code and upload it to any Arduino board. It runs on Windows, Mac OS X, and Linux.

84
votes
19answers
13k 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++...
72
votes
9answers
147k 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 ...
31
votes
3answers
28k 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 ...
18
votes
2answers
12k views

Why can't I declare a class in another tab in Arduino IDE?

I wanted to move some of my code out into a second tab in the Arduino IDE, to keep things better organised. At first, I only tried moving a function, and it seemed to work fine. I could call the ...
16
votes
3answers
17k views

Arduino program only works when run as root

Uploading simple sketches seems to work when I run the Arduino program as root (sudo). I would like to run it as a regular user. Has anyone faced the same problem before and fixed it? Here is what I ...
13
votes
5answers
56k views

deprecated conversion from string constant to 'char*'

What does this error means? I can't solve it in any way. warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
12
votes
1answer
24k views

Arduino IDE #ifdef

I use my Arduino IDE to either upload my sketch to a Arduino or ATTiny or ATmega328. As you know each device can have a different pinout. Does the Arduino compiler support ifdef, depending on the ...
12
votes
5answers
40k views

Program an ATMega328P and use it without Arduino board

I'd like to use an ATMega328P for my project, I hope to do it without the arduino board. I know with the Arduino IDE and an Arduino board I can program the microcontroller. However, would it be ...
11
votes
4answers
7k views

Writing C Program outside of Arduino IDE?

I like the idea of using the Arduino IDE for simple projects and for getting started with Arduino, but the consensus I've gotten so far is that it is for those who are new to Arduino and/or ...
10
votes
2answers
9k views

CLion + Arduino

Please, help me to set up Clion + Arduino. Clion has an Arduino plugin which I've installed. Here is some instruction on Github but I'm fully noob about cmake and other things which are talking ...
10
votes
4answers
18k views

ESP8266, Arduino IDE vs Lua?

I'm planning to buy an ESP8266. Do I really need to learn Lua to play with it? I have seen some people using it with the standard Arduino IDE. Do you need a custom firmware to use the Arduino IDE ...
10
votes
1answer
248 views

I can't seem to receive data to the ArduinoStudio serial monitor on ubuntu 14.04 [closed]

I'm using the Arduino Starter Kit so I have a Uno R3 and going through the examples I'm trying to read temperature data from my controller in Arduino Studio. In essence my problem can be reduced down ...
9
votes
4answers
52k views

Arduino compatible's serial port not showing Mac OSX

I bought an Arduino-compatible Freaduino board atmega8 (I selected the board type as Arduino ng or older atmega8). I installed the Arduino IDE on Mac OS X and the FTDI drivers. But my serial port ...
8
votes
8answers
6k views

Different ways (and the fastest) to compute sines (and cosines) in Arduino

I am using an Arduino Uno board to compute the angles of my system (robotic arm). The angles are actually 10 bit values (0 to 1023) from the ADC, using the full range of the ADC. I am only going to be ...
7
votes
2answers
4k views

Can I use arduino's 3.3 V output directly to esp8266?

I just bought esp8266 and ftdi usb driver, I want to power the esp8266 with Arduino's 3.3 V output, is that possible? I saw some tutorial on youtube in that they are suggesting us to use 3.3v ...
7
votes
2answers
2k views

Remove unused boards from Arduino IDE

In the current project I'm programming simultaneously an UNO board and a Leonardo one. Switching back and forth between the two boards in the Tools menu takes too much time because of the other 18 ...
7
votes
3answers
5k views

Manchester Library Won't Compile for Attiny85

I am creating a wireless sensor using an Attiny85. I want to send the data to an arduino uno, so I purchased the 315mhz rf link kit from spark fun. Since the Attiny85 does not have a TX I decided to ...
7
votes
2answers
1k views

Programming Chinese Arduinos

I have an authentic Arduino UNO, but I didn't want to pay full price for a new one to build semi perminate projects, so I bought a few ATMEGA328P-PU chips off of AliExpress: https://www.aliexpress....
7
votes
2answers
3k views

Why does an `.ino` file have to be in a folder of the same name?

I'm trying to organise a very complicated project and I want to put all the actual code in a folder named src (source), but I want to keep the main .ino file as main.ino (it will also be in src). Then ...
7
votes
2answers
17k views

Difference between /dev/ttyACM0 and /dev/ttyS0 (Arduino IDE ports under Linux)

I use the Arduino IDE to upload sketches to my Arduino Uno. My OS is Linux Ubuntu 14.04 LTS. The Arduino IDE has two ports by default for communication with the Arduino Uno: /dev/ttyACM0 /dev/ttyS0 ...
7
votes
5answers
7k views

ERROR: Timed out waiting for Arduino 101 - anything I can do?

I just received an Arduino 101 so I did the following in a wave of excitement... Connected the USB cable between it and my Macbook Pro Started the Arduino IDE version 1.6.7 Wrote a little bit of code ...
6
votes
2answers
1k views

How to handle multiple simultaneous Arduino development environments?

I am developing for several different target microcontrollers (on OS X 10.11), which requires some unique combinations of (Arduino) IDE version, library versions, USB drivers, support software, etc. ...
6
votes
1answer
8k views

Can I change font Color and/or Type for IDE 1.5.6r2?

The program becomes harder to read (at least on my particular monitor) after upgrading. Any way to change font Color to darker color and/or Type to thicker stroke (like B in this question editor) ...
6
votes
1answer
10k views

In ESP-12E NodeMCU, what's the pin number of A0?

In ESP-12E NodeMCU, all digital pins can be called with a number. Here is the list: static const uint8_t D0 = 16; static const uint8_t D1 = 5; static const uint8_t D2 = 4; static const uint8_t ...
6
votes
2answers
689 views

Can I specify custom port names in the Arduino IDE on Linux?

On Linux, if you have more than one USB TTY device, the USB port name (/dev/ttyUSBx) changes every time one is plugged in, and there's no easy way to know the new name without going and looking ...
6
votes
1answer
797 views

Avoid the 10 attempts of Avrdude when programmer is not responding

Sometime I update my sketch in the Arduino environment, and when I click on the transfer arrow but forget to plug my arduino (I'm using the UART in my project so every time I need to plug/unplug some ...
6
votes
2answers
4k views

Wire.h not found!

Here's the code that's making this error: #include "Wire.h" Here's the error: fatal error: Wire.h: No such file or directory #include "Wire.h" ^ compilation terminated. Error ...
5
votes
4answers
31k views

Difference between print() and println()

What is the difference between print( ) and println( )? I see none when I run a code.
5
votes
1answer
931 views

How can I have code in a project that won't compile for Arduino?

I want to test the algorithms in my code without needing to send it to an actual Arduino board. I figured I could lay out my project like: project/ core.cpp # core algorithms core.h ...
5
votes
2answers
866 views

Arduino onboard LED pin number as a constant

To use the onboard LED on an Arduino one usually has to know the pin number (13 in most cases), but is there a constant in the Arduino IDE one can use as well? So is it possible to use something ...
5
votes
1answer
9k views

How shiftOut function works internally? (explanation on source code)

I were examining shiftOut() function code in wiring_shift.c and I didn't quite understand what is going in digitalWrite function. I see !!(val & (1 << i)) is taking the bit value from val ...
5
votes
2answers
10k views

Location of examples folder in Ubuntu

I'm trying to add some additional example files to the Arduino IDE in Ubuntu 14.04. However, I can't for the life of me find where the examples are stored in my system. I checked the Arduino website, ...
5
votes
1answer
353 views

Accessing a C++ static variable from gcc inline asm

For some reason I want to mix a bit of assembly with C++ (not C). To allow the code to be compilable using the standard Arduino IDE, I don't want to use direct assembly source. I don't want to use a ...
5
votes
3answers
326 views

Not getting proper readings on Arduino from MAP Sensor

In recent project, I have to take reading from MAP sensor. So basically, we used analog pin for this. But in my case, I don't get proper result which actually I want. When I'm taking readings through ...
5
votes
1answer
2k views

Basic C++ programming, how to pass constructor argument into class?

I'm having some programming problems. So here's what's happening: In my .ino file, I have a tft variable which holds the connection to a LCD. I want to make a class which can either automatically ...
5
votes
1answer
385 views

How to change colors and theme settings in 'Windows Store app' version of Arduino IDE?

In the standard Windows (Win32) version of the Arduino IDE, theme settings like syntax coloring can be modified in C:\Program Files (x86)\Arduino\lib\theme\theme.txt. For the Windows Store app ...
5
votes
1answer
177 views

Advanced Arduino Project Help

So, I am an Engineer working on a very time tight project. I want to create a system capable of collecting data from a Photodiode and compiling it in a way that will separate data into four columns ...
5
votes
2answers
129 views

Different Arduino packages on Raspbian

I'm working on using my Raspberry Pi (Raspbian) to upload sketches. However, I'm not sure which package is appropriate for command line usage (like described here on Github). It seems like sudo apt-...
5
votes
1answer
528 views

delete the memory or re-upload a program

At the moment I am following the instructions of this project https://github.com/JoernL/LimiTTer. Besides the peripheral parts like a Bluetooth module and an NFC module, the central unit is an Arduino ...
4
votes
4answers
3k views

Why does opening the Tools menu take so long?

Every time I open the Tools menu, the IDE freezes for a few seconds. Why is that? It happens on both of my computers, and nothing I do makes a difference in how long it takes. I've tried restarting ...
4
votes
5answers
21k views

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); ...
4
votes
2answers
352 views

How Arduino IDE works?

You know , a simple arduino sketch has no main function , no include preprocess cmds,so I just want to know how arduino IDE convert a sketch to normal C/C++ source code,and what is the source code ...
4
votes
2answers
301 views

How are errors (not related to syntax) managed in arduino and in the AVR architecture in general?

I was just curious about how the AVR architecture manages errors that would cause a regular desktop program to crash. I'm talking about logical errors for example math problems that are undefined. ...
4
votes
2answers
19k views

How do I change the Console colour of Arduino IDE?

Leading on from the question Can I change font Color and/or Type for IDE 1.5.6r2?, in 1.6.0, or 1.6.11 it does not seem to be possible to change console.color or console.error.color. To be precise, ...
4
votes
3answers
7k views

ESP8266 Analog read interferes with wifi?

Short version: I have a program that connects my ESP8266 to wifi so I can control a relay connected to it over the internet or a button. I also have a sensor for my door. This software works ...
4
votes
2answers
300 views

upload.tool not used in custom boards.txt?

I've created a custom board in boards.txt and changed the upload.tool to a nonsense value, and yet when I do an upload the IDE still calls avrdude. For example, In boards.txt I've changed the line... ...
4
votes
3answers
689 views

How to correctly use functions that return pointers to multiple typedef'ed types in Arduino IDE?

I have a program that typedef's two structs. Each one has a corresponding function that returns a pointer to it.... typedef struct { int x1; } x; x *a; x *f(void) { return a; } typedef ...
4
votes
1answer
618 views

What is the relationship of an Arduino .ino file to main.cpp?

Is the .ino file an alternative from a main.cpp file? If yes, then could someone mind explaining the structure of the .ino file in main.cpp and its relationship?
4
votes
2answers
1k views

Properly using separate tabs with Arduino IDE

I'm trying to split up a large project of mine into separate tabs in the Arduino IDE and I'm having more than a few troubles with it. My main trouble is finding a way to have routines in extra tabs ...
4
votes
2answers
2k views

How does Arduino IDE 'Get Board Info'?

I want my C# application to automatically select the correct COM port by way of a string equality check against a 'GetInfo'-type request to the Arduino board. I know the Arduino IDE can get info ...