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
3
votes
3answers
878 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... ...
3
votes
1answer
47 views

Recover .ino file from tmp files?

Is it possible to recover an .ino file/sketch in/for Arduino? I really need my file back, but ones i uploaded it to my device it vanished from the sketch folder, nor can I find it in the build folder; ...
3
votes
2answers
19k views

How can I tell what programmer to use?

I have a bunch of different dev boards for different projects. What I have been getting very confused about is what board needs what programmer from the Tools > Programmer menu. I wish the selection ...
3
votes
1answer
5k views

How to have compiler know whether Arduino or ESP8266?

I am doing some work for both Arduino Mini Pro and for a NodeMCU style ESP8266 board. Within the Arduino IDE I tell it what board I am compiling for and downloading to. How do I access which board in ...
3
votes
2answers
330 views

Can Arduino Sketch be used for production

There are lot of device support with the help of Boards Manager today and is on going in Arduino IDE. So I am curious to know about can one use those for production purpose. Or it is recommended for ...
3
votes
2answers
11k views

Problems on convert byte[] to String

I'm reading a RFID Card from RC522 and send the data to my computer. My problem is the conversion of byte[] to String or std::string. #define SIZE_BUFFER 18 #define MAX_SIZE_BLOCK 16 byte ...
3
votes
3answers
2k views

Atmega328p - Going low power 1.8V using 4Mhz oscillator - Bootloader flash

I would like to use an Atmega328p micro-controller with a 4 Mhz oscillator in order get some low power consumptions. I am using an Arduino board to flash the bootloader into the Atmega. EDIT In ...
3
votes
2answers
11k views

Arduino Uno R3 to Wemos D1 R2 project migration - Pinout problems

So i've chosen to purchase a Wemos D1 R2 board in order that my old Arduino Uno R3 projects can get some new IoT features. However, even if my code is working in Uno perfectly, i want to test it using ...
3
votes
2answers
1k views

Difference between Ultrasonic sensor and Distance Sensor?

What is the difference between an Ultrasonic Sensor and a Distance Sensor?
3
votes
3answers
3k views

Can't include files

For some reason, the Arduino IDE can't find the file I have made for the project: #include <foo1.h> #include <foo2.h> #include "foo3.h" Where foo1 and foo2 are normal libraries thus ...
3
votes
2answers
216 views

Form a signal from an array of bits

I need to reproduce with a digital pin of an Arduino such a key in the form of a sequence of 1's and 0's, where a one takes 2 ms high and 2 ms low, and a zero takes 1 ms high and 1 ms low. int key =...
3
votes
2answers
2k views

Convert Hex to Decimal from signed 2's complement

I am reading data from a meter over dlms protocol and I am getting hex values from there. I want to convert that hex string to signed decimal value. For example - ff9d denotes a value of -99 [...
3
votes
1answer
225 views

How do I set up a multi-file project in the Arduino IDE?

Suppose I have a project with several modules and a main program. This works well by adding the modules to main_program. module1.cpp module1.h module2.cpp module2.h ... main_program.ino I'm having ...
3
votes
2answers
8k views

Exception Handling with the Arduino IDE

I'm using a port of the STL found here and trying to debug with a simple try{...}catch{...} loop. When compiling with the Arduino IDE, I get the error message exception handling disabled, use -...
3
votes
1answer
90 views

Correct way of having loop end when required?

I'm brand new to Arduinos. I'm currently trying to modify a script from here which at the moment, simply turns an LED on or off depending on which HTTP GET request it receives. However, I want to ...
3
votes
2answers
2k views

Cannot find crtatmega328p

I have just installed the arduino IDE on my gentoo laptop. I then installed the toolchain with the following command: crossdev -s4 avr This does a stage 4 install of the toolchain, with all its ...
3
votes
1answer
291 views

Alternatives to Nextion display

I am wanting to have a display where I can design the GUI on a program and then somehow transfer it to the display. For the graphics I want to make, it would be really hard to manually write the code. ...
3
votes
2answers
167 views

'Servo_Pointer' was not declared in this scope

I can't seem to find the error I made; can anyone help me? The error message: 'Servo_Pointer' was not declared in this scope I get the error at the end of the code with the line: Servo_Pointer.write(...
3
votes
1answer
151 views

What are the benefits or advantages of Arduino CLI? [closed]

I saw that Arduino got a CLI (Command Line Interface), and my first question was "why?" Even after reading the article, I don't see or understand its advantages. What advantages or benefits does a ...
3
votes
1answer
1k views

Compiling error:passing as 'this' argument

I am trying to make a small keyboard class to handle two buttons(in the future >2) that are connected to my arduino UNO. The buttons being pressed are detected using interrupts. Here is the code: ...
3
votes
1answer
1k views

Arduino + DS18B20 array

I want to connect 24 DS18B20 sensors to arduino by onewire library in the same digital pin . Can anyone post an example code ? Thanks
3
votes
1answer
455 views

Arduino library making

I make my own library for arduino. The file structure is like below. AAA - README.md - examples - A - A.ino - B - B.ino - AAA.h - BBB.h - CCC.h - BBB.cpp - CCC....
3
votes
1answer
156 views

How does if(serial) work, a c++ question

The Arduino documentation says if(Serial) always returns 1, except for the case where Leonardo USB serial connection delays becoming ready. (Leonardo has two USB IDs, and switches between them for ...
3
votes
1answer
246 views

How does Arduino IDE for mac deal with functions in other files

I'm a longtime C programmer. I've also done a little C++, a little Java, and a LOT of Objective-C, but am fairly new to the Arduino platform and it's IDE. So far all my sketches have had a single ...
3
votes
1answer
828 views

How to add the -F switch for avrdude in Arduino IDE

So, before starting to learn with something else, I'll give it one last try. The avrdude is complaining that the device signature doesn't match. Whatever, I don't care. To me, what's written on it is ...
3
votes
2answers
1k views

Multiple IDE instances

I recently moved all in for Linux and have no intentions of going back to Windows, but programming for Arduino is a little annoying as I cannot find a way to have multiple instances. In Windows you ...
3
votes
2answers
1k views

Formula for decision making when in contact with an obstacle using Arduino

I am currently working on an obstacle avoidance robot project and I have seen numerous algorithms for obstacle avoidance a very good example is this Obstacle avoidance algorithm [Editor's note: by ...
3
votes
2answers
4k views

Trying to make a heart rate analyser with Arduino that will calculate the BPM of a person

I am trying to make a heart rate analyzer device using an Arduino board that will calculate the BPM of a person by using raw sensor signals greater or equal to the threshold value to calculate pulses/...
3
votes
2answers
1k views

Connect Arduino Uno to video camera's web Server via Ethernet (not working)

I work with cameras in the film and TV industry. A project I have just started tinkering around with is building an Arduino Uno-based box that would automatically collect the metadata (settings, etc.) ...
3
votes
1answer
102 views

Arduino IDE automatic tools

I know that the Arduino IDE does some simple tasks automatically: for example it creates function prototypes, but this function sometimes fails. Does that IDE run other hidden "pre-precompiler" tasks?...
3
votes
2answers
305 views

How do I program my Arduino Yun Shield when I keep getting this AVRDUDE error message?

The error message is: avrdude: AVR device initialized and ready to accept instructions avrdude: Device signature = 0x1e950f avrdude: Expected signature for ATmega32U4 is 1E 95 87 Double check ...
3
votes
2answers
118 views

Pinball - “All Lanes Lit” Bonus score is not behaving as expected

I'm trying to build a (very basic) pinball machine with an Arduino Uno. This part of the code will detect when a ball passes 3 lanes. When a lane is passed, it will activate the lane(laneState), ...
3
votes
1answer
283 views

Crosspack instead of Arduino IDE, how to include Arduino.h

I quit using the Arduino IDE, instead I am now using Crosspack via the command line on my Mac. It is working totally fine. I use "make" to compile it, "make flash" to upload it to the Arduino. This ...
3
votes
1answer
7k views

Arduino zero Error: unable to find CMSIS-DAP device

I am uploading a test sketch(Blink) to my new Zero(with Wifi101 shield) and when I press Upload in the IDE, the Console says the following: Arduino: 1.6.10 (Linux), Board: "Arduino/Genuino Zero (...
3
votes
2answers
16k views

Error on UNOr3--> avrdude: ser_open(): can't open device “/dev/ttyUSB0”: No such file or directory ioctl(“TIOCMGET”): Inappropriate ioctl for device [closed]

When I try to upload my program on the Arduino Uno Chinese clone, It says -> avrdude: ser_open(): can't open device "/dev/ttyUSB0": No such file or directory ioctl("TIOCMGET"): Inappropriate ...
3
votes
1answer
4k views

Arduino with WS2812 using Adafruit NeoPixel library fade in/out different patterns

Hey all I have been trying to figure out a way to random set patterns for my fade in/ out code below: int PIN = 3; int totalLEDs = 11; int ledFadeTime = 5; Adafruit_NeoPixel strip = ...
3
votes
2answers
837 views

Arduino Upgrading from 1.0.6 to 1.6, code doesn't work anymore

I'm using Arduino UNO, and today I upgraded my IDE from 1.0.6 to 1.6, just to upgrade, nothing special. I got my libraries again but I got an error with a code that was working OK. The error was: ...
3
votes
2answers
68 views

Code for ESP32 without Development Board

I'm very new to microcontrollers. I'd like to start developing for the esp32, as it has integrated wifi & bluetooth for quite cheap. This being said, i don't have a board yet. Is there a way i can ...
3
votes
1answer
233 views

ESP8266 always resetting after 65 second of running

I have a simple code where ESP8266 is asking MySQL database about actual state of LED (whether 1 or 0) and when DB has 1 ESP8266 turns LED on... But my problem is after 65-66 seconds of server running ...
3
votes
1answer
1k views

WindowsError(31, 'A device attached to the system is not functioning.') in arduino

Having board esp32 devkit v1, to get started with arduino ide (installed recommended boards for esp32) I marked board asDOIT ESP32 DEVKIT V1 (as no other options as like ESP32 DEVKIT V1 ) so upload ...
3
votes
1answer
444 views

Bootloader and Boards Definition for Atmega2560V-8AU at 8 MHz / 3.3v

I am working on a home made project,where i am using Atmega2560V-8AU (note the suffix, this part has an 8 MHz maximum clock rate) as my main controller, supplying 3.3V to this chip. I want this ...
3
votes
3answers
6k views

ATTiny85 and DHT11 - Sensor always returning 0

Good day. I am making a small weather station using ATTiny85, DHT11, and an OLED display. There are many, many tutorials that explain how this works, and various libraries that show you how to get ...
3
votes
1answer
85 views

Working on my second project and I'm confused about proper procedure for turning on the arduino

The first project I did was just making the led blink (it was pulsing a signal to pin 13. I'm guessing most of you have seen similar tutorials). Today I plugged in some wires and resistors and wrote ...
3
votes
2answers
115 views

What would be the architecturally-right place to put custom -D defines?

What I am trying to accomplish is to include information about the state of my environment at build time in my code. For example, I may want the setup() code to print the git sha it was built against, ...
3
votes
1answer
257 views

Bluetooth not transmitting refreshed sensor values

I have a 9 DOF sensor attached to a BLE chip and Arduino Uno. I want to send the position measurements (i.e. x, y and z coordinates) from the sensor to my iPhone app (Bluefruit LE). The code below ...
3
votes
1answer
826 views

how can I change the setting for number of upload retries in the IDE?

I run into this problem when I mess something up, and it's pretty annoying to wait for 10 not in sync timeouts before I can try some different method. ... avrdude: stk500_getsync() attempt 9 of 10: ...
3
votes
0answers
4k views

How to flash pre-compiled bin files into NodeMCU using Ardunio IDE

How to flash pre-compiled binary into NodeMCU using Ardunio IDE. Since every time it require to compile and flash it. Is there way to flash binary alone to nodeMCU via Arduino IDE ? One can export ...
3
votes
1answer
4k views

Running two stepper motors with two rotary encoders

I'm really bad with this coding part of using two rotary encoders to control two stepper motors [using 28BYJ-48 stepper motor with the ULN2003 board]. This code works fine using one rotary encoder for ...
3
votes
0answers
829 views

Using CLion as Arduino IDE — Cannot find Libraries

I'm having a problem using CLion as Arduino IDE when integrating 3rd-party libraries: Here is the CMakeList.txt cmake_minimum_required(VERSION 2.8.4) set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/...
3
votes
4answers
4k views

How to connect an Arduino Micro to MPU-6050

So I'm trying to connect my Arduino micro to the MPU-6050. I was using this tutorial: https://diyhacking.com/arduino-mpu-6050-imu-sensor-tutorial/ This tutorial worked with my Arduino Uno but not ...

1 2
3
4 5
29