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, macOS and Linux.

Filter by
Sorted by
Tagged with
93
votes
9answers
231k 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 ...
89
votes
22answers
17k 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++...
37
votes
3answers
43k 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 ...
23
votes
2answers
16k 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 ...
19
votes
2answers
18k 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 ...
19
votes
3answers
22k 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 ...
18
votes
5answers
73k 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]
15
votes
5answers
85k 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); ...
15
votes
4answers
27k 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 ...
15
votes
2answers
5k 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 ...
13
votes
4answers
59k 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 ...
13
votes
1answer
31k 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
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 ...
11
votes
2answers
36k 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 ...
11
votes
1answer
357 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 ...
10
votes
10answers
14k 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 ...
10
votes
4answers
57k 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 ...
9
votes
3answers
3k views

Hiding WLAN password when pushing to GitHub

I have started to use GitHub to store Arduino code. However some of my code uses the SSID and password for my WLAN which I don’t want published. A common way of handling this in non-embedded ...
9
votes
7answers
10k 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 ...
9
votes
2answers
3k 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 ...
9
votes
1answer
17k 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 ...
9
votes
5answers
2k 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 ...
8
votes
4answers
58k views

Difference between print() and println()

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

Confuse about PROGMEM and R“====()====”

I saw the following code from https://circuits4you.com/2018/03/10/esp8266-jquery-and-ajax-web-server/ but I could not understand it thoroughly... I looked at the documentation of PROGMEM from this ...
8
votes
1answer
6k 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?
8
votes
3answers
6k 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 ...
8
votes
3answers
6k 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 ...
8
votes
2answers
40k 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 ...
7
votes
1answer
15k views

Split up Arduino code into multiple files using Arduino IDE

I am working on a very long code that requires multiple functions defined. I want to split the code into two files as main code ("Feeder_Control" in the screenshot) and functions ("connections" in the ...
7
votes
4answers
7k views

Can I use Visual Studio instead of Arduino IDE?

I think that Visual Studio is a great product! I find the Arduino IDE is limited in its features. For example the Arduino IDE does not have: Code prediction Error highlighting Previews of #define ...
7
votes
1answer
14k 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 ...
7
votes
2answers
2k 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
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) ...
7
votes
2answers
15k 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!
7
votes
1answer
1k 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 ...
7
votes
1answer
15k views

ESP8266 & websockets

At the moment, I'm using various operating systems and devices like the Raspberry pi to control lights and other stuff over websockets. I use websockets since they added the support on Chrome. I write ...
6
votes
2answers
4k views

Arduino IDE fails on Fedora with arduino-builder error “Parameter 'tools' is mandatory”

The arduino-builder app when invoked directly with parameter --tools /usr/bin works, but the IDE fails with the error in the title for any sketch (including the Blink example). I've tried adding ...
6
votes
2answers
14k views

Serial.println(): Where is the text printed?

When I used Serial.println() in the code I naively believed I would see the characters that I sent displayed on that little black area just under the interface (just like a terminal). #include <...
6
votes
3answers
11k 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 ...
6
votes
2answers
25k 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, ...
6
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. ...
6
votes
2answers
6k 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 ...
6
votes
2answers
13k views

How to see log from Arduino IDE?

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

How to simply close a tab?

How can one close a tab in the Arduino IDE? There is a Tab button (little triangle) with the Option "Delete"(kind of misleading term). There is no "Close" option. And the "Delete" option doesnt do the ...
6
votes
2answers
245 views

Arduino IDE won't use selected port

I'm trying to program an ATtiny85, using an AVRISP mkII programmer (this one: https://www.amazon.de/dp/B00IYNAXUC/ref=cm_sw_r_sms_c_api_i_VXOWDb3H3N5ND) with the Arduino IDE (version 1.8.10 on Ubuntu ...
6
votes
1answer
4k views

Adding a custom board to the Arduino IDE

I would like to know what is the procedure for adding a custom board to the Arduino IDE? My custom board is similar to the Arduino Zero. Instead of using the ATSAMD21G18, my board is based around the ...
6
votes
1answer
1k 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
3answers
35k views

How to get the firmware (hex) file from a .ino file containing the code

I currently have a .ino firmware file that I use in the Arduino IDE to program an ATmega328 micro-controller. I would like to get the file that the Arduino IDE uses to program the micro-controller. ...
5
votes
2answers
32k views

How to determine Flash size?

I need to determine the flash size of my ESP8266 on my NodeMCU module in order to flash the AT firmware onto the board. Apparently different boards come with differently-sized flash memories. Can ...
5
votes
2answers
615 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. ...

1
2 3 4 5
29