Stack Exchange Network

Stack Exchange network consists of 175 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.

86
votes
20answers
14k 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++...
76
votes
9answers
171k 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
31k 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 ...
19
votes
2answers
13k 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
18k 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
61k 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
25k 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
45k 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
20k 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 ...
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
11k 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
1answer
261 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
53k 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
9answers
8k 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 ...
8
votes
2answers
4k 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
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
5answers
8k 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 ...
7
votes
2answers
20k 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 ...
6
votes
5answers
33k 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); ...
6
votes
1answer
10k 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 ...
6
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....
6
votes
3answers
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 ...
6
votes
1answer
9k 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
470 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 ...
6
votes
1answer
12k 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 ...
5
votes
4answers
38k views

Difference between print() and println()

What is the difference between print( ) and println( )? I see none when I run a code.
5
votes
3answers
8k 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 ...
5
votes
1answer
936 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
1answer
1k 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?
5
votes
2answers
12k 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
2answers
7k views

How to see log from Arduino IDE?

Where can I see outputs from such instruction in an ino file ? Serial.println("my message");
5
votes
1answer
2k views

How to enable maximum Dead Code Removal?

I am running out of code and data memory space on ATMega328P. Code size is big as I used several libraries, but, I only use a few functions of those library. Apparently, the default IDE is only ...
5
votes
3answers
376 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
2answers
2k 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. ...
5
votes
2answers
6k views

avrdude ser_open() can't set com-state

When trying to upload the blink sketch to my (unofficial) Arduino Uno, I get the following error: avrdude ser_open() can't set com-state for "\\.\COM3" I have programmed this Arduino before using ...
5
votes
2answers
825 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 ...
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
668 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
877 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 ...
5
votes
2answers
136 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
664 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 ...
5
votes
2answers
5k 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 ...
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
2answers
327 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
20k 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
2answers
981 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 ...
4
votes
2answers
423 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
2answers
8k views

Use LoLin V3 pins starting with 'S' in Arduino

I have this LoLin NodeMcu V3 board: What are the pins S3, S2, S1, SC, S0, SK? Can I use them as GPIO in Arduino? Thank you for your help!
4
votes
2answers
600 views

One workspace, two IDEs - Possible?

How can I create a workspace & projects so that either the Arduino IDE or the EclipseArduino IDE may be used to develop the project, interchangeably? I have both IDEs installed and working but in ...