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
5
votes
2answers
629 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. ...
5
votes
2answers
64k views

“stray '/302' in program error” when compiling

For some weird reason, the following code doesn't compile. I get a "stray '\302' in program" error around volatile unsigned int encoderPos = 0;, and I have no idea what the issue is. I've been trying ...
5
votes
1answer
958 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
1k 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
2answers
16k 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
325 views

Does the compiled binary of a sketch include uncalled functions from a library?

I am writing a GUI using a TFT display and the Adafruit GFX library and its default font on Arduino Nano. I want to be memory efficient and I assumed that the 'optimise for size' default setting of ...
5
votes
2answers
8k 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 ...
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
508 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
1k 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
2answers
798 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 ...
5
votes
2answers
510 views

How to on/off light dimmer using another pin?

In recent project, I'm working with light dimmer. Let me explain with example of fan. In switch board, we have a fan switch which can able to ON/OFF our fan & FAN REGULATOR which vary speed of ...
5
votes
1answer
471 views

Referencing local libraries from higher dir levels

How can I include libraries not contained in any direct subdirectories of a sketch, using the Arduino IDE? I want my project structure to look like this: Project └> MCUa └> MCUa.ino └> ...
5
votes
2answers
12k 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
2answers
10k views

Can the Arduino Eclipse plugin use the libraries installed by the Arduino IDE?

In Arduino Eclipse (v3, nightly build) I have not been able to load 'foreign' libraries, those written by me or someone else, so they are not among the available choices in the include-library dialogs....
5
votes
5answers
12k views

Arduino IDE Permision Denied For Upload, Ubuntu

I am having issues uploading to my Arduino from the IDE on Ubuntu 18.04. The error message I have received is: Arduino: 1.6.10 (Linux), Board: "Arduino/Genuino Uno" avrdude: ser_open(): can't ...
5
votes
1answer
4k 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
5answers
502 views

ATmega168a Breadboard - can't load via Arduino IDE

I have ATmega168a on a breadboard. I am programming it via the Arduino IDE and a FT232RL USB adapter. When I select my board for 168 and upload, I get the following error: stk500_getsync(): not in ...
5
votes
1answer
1k 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
3answers
50k views

Only 2 decimal places in printed float

There was a similar thread before but it didn't solve my problem. I had an issue with sending GPS data, which is float, and I couldn't receive the float with the same amount of significant figures as ...
4
votes
2answers
454 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
3answers
20k views

Arduino IDE 1.8.6 not starting.

My Arduino IDE is not getting started. It just crashes before opening up. I don't know what the problem is. It was working well enough before without any issues. This is what I see after running the ...
4
votes
3answers
18k views

Passing class member function as argument

I need to pass a class member function to server.on, unfortunately i get an error. error: no matching function for call to 'ESP8266WebServer::on I have done some searching but could not understand ...
4
votes
3answers
397 views

Programming Arduino Uno R3 to trigger a relay once every 24 hours

I programmed Arduino UNO R3 to trigger a relay once every 24 hours from the moment it is powered on I calculated milliseconds and used the function delay() 24 hours * 60 minutes each hour * 60 second ...
4
votes
2answers
5k views

No programmers available for this board - Programming ESP32 Cam with Ardunio IDE

This is my first time working with ESP32 Cam boards. I have followed the instructions as given in this site https://technoreview85.com/how-to-program-esp-32-cam-using-arduino-uno-board/ However my IDE ...
4
votes
1answer
10k views

Arduino IDE Display Code Line Numbers [closed]

In the Arduino IDE: How can I get the line numbers shown in a sidebar of the editor? It is hard to find which line my errors are referring to without them... I am using Arduino IDE on a form of ...
4
votes
3answers
57k views

Arduino Nano v3.0 with ESP8266

I am attempting to connect and use an ESP8266 board with my Arduino nano v3.0 and I am not have much luck. I have read a bunch of tutorials and articles, the most recent is http://elektro-blogger....
4
votes
2answers
7k views

Multiple libraries were found for “WiFiClient.h” using nodemcu

I am trying to send HTTP requests from nodemcu so I started by uploading the esp8266 library but when I run the following code #include <ESP8266HTTPClient.h> #include <ESP8266WiFi.h> ...
4
votes
1answer
2k views

Arduino IDE and subfolders

I have a sketch with multiple source files and folders arranged like so. I've divided up the project like this to keep things clean. | \---project | project.ino | types.h | +---...
4
votes
1answer
58 views

Two Arduino boards - one IDE

Have been using UNO MEGA for small projects. Recently bought an UNO for other projects. Can I just go into the IDE an under Tools select UNO and a different port to do projects and rename sketches to ...
4
votes
2answers
43k views

How to fix: Invalid conversion from 'const char*' to 'char*' [-fpermissive]

I'm trying to upload the code from here to work with an ESP8266. So I copy/pasted the code to the Arduino IDE and I get this error: C:\Program Files (x86)\Arduino\libraries\WiFi\src/WiFi.h:79:9: ...
4
votes
5answers
9k views

How to write modular code for arduino?

I would like to create a program with separated modules, is this this possible using Arduino IDE?
4
votes
1answer
221 views

MEGA 2560: Simple program - One analogWrite turns off the other

I'm using Windows 10, Arduino 1.8.12 (Windows Store 1.8.33.0) I have an Arduino MEGA 2560 and a red LED connected to pin 4. #define RED 4 #define GREEN 2 void setup() { analogWrite(GREEN, 0); ...
4
votes
1answer
3k views

Tone() conflicts with IRremote library (multiple definition of `__vector_7')

I have just started with Arduino and C++ so I apologise if my question is very basic. I am trying to use tone() with a passive buzzer to create a sound while also using the IRremote library for a ...
4
votes
1answer
3k views

Built-in capacitive touch detection with SAMD21 development board (Arduino Zero Compatible)

I bought this SAMD21 development board which shows up as an "Arduino/Genuino Zero (Native USB Port)" when plugged in. And I've successfully got a blink sketch running on it all good so far: The ...
4
votes
3answers
26k views

How to convert an hex string to an array of bytes?

How to convert the char array to Byte array? I tried every method but it doesn't work. char CardNumber[8] = "B763AB23"; // Length is 8, basically it's in Hex // B7 63 ...
4
votes
1answer
981 views

Why does Arduino IDE take so long to open?

I have Arduino IDE, version 1.8.10 (Windows 10 x64, 8GB RAM, i5-7200 @2.5GHz) on a network drive mapped to D:, on a 100Mbit wired network and fast file server. If I navigate to the network shared ...
4
votes
2answers
3k views

Protocol options for data exchange between Arduino and ESP8266

I have a device built with an Arduino uno: Arduino software installed on an Arduino uno can be controlled via serial commands can be controlled via physical buttons and sensors on any button/sensor ...
4
votes
1answer
74 views

HobbyTronics UNO PRO Board Definition does not work in newer IDE versions

I have a HobbyTronics UNO PRO that replaces the UNO's 328P in DIP with an ATMega1284 on an adapter board: I cannot link to the original page since it does not exist anymore. But, it is available ...
4
votes
1answer
1k views

Unable to upload sketch using Platformio (but Arduino IDE works)

I am using an Arduino Nano (Clone) which I was programming with the Arduino IDE (Version 1.8.5 on Mac OS X 10.10.5). Using the Arduino IDE I need to re-plug the Nano before uploading, but after doing ...
4
votes
1answer
3k views

Controlling an LED using SIM900A and Arduino

How can I turn the LED on and off using a received text message? The sim card is able to receive the message but I can't change the pin status. I also can't see anything in the serial monitor upon ...
4
votes
1answer
170 views

Selling a product using Arduino microcontroller or bootloader [closed]

I was wondering if I am legally allowed to sell an Arduino based product. I also want to know if it is easy for people to retrieve code from an Arduino based circuit (reverse engineer it) or upload ...
4
votes
1answer
212 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 ...
4
votes
0answers
2k views

Send custom 802.11 data frame with ESP8266 [closed]

I would like to send raw 802.11 data frames in order to transmit pictures with the ESP8266. I have the Espressif SDK 1.3 and so far I have tried to construct a packet and send it with ...
3
votes
2answers
1k views

Is Arduino IDE enough to program with C or C++?

I am using Arduino IDE to program my ATmegas with bootloaders. I can directly manipulate ports, use timers, interrupts, PWM pins and timers, etc. Everything is working. But this question arises: Does ...
3
votes
4answers
5k views

Running a function in the background continuously

I have a keypad which is connected to arduino (with one analog pin).In the arduino code, I have created a circular queue which stores the inputs by pressing on keypad. Now when a key is pressed on ...
3
votes
3answers
458 views

Control I2C relay board from two Arduino Uno

how can I make multi master Arduino device to work with single I2C device? As both the master device are 20 m away from Slave device, I am using the I2C relay board to connect with 2 Arduino boards ...
3
votes
2answers
86 views

Mac shortcut for next window - IDE 1.8.7 problem

How do I use the keyboard to cycle through Arduino windows on a mac? In my System preferences, I have (default): Keyboard -> Shortcuts -> Move focus to next window = Cmd ⌘ ` It works perfectly ...
3
votes
3answers
1k 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 ...

1
2
3 4 5
29