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
2answers
2k views

How do I see underlying code and definitions inside Arduino IDE on MacOS X El Capitan

I'm a newbie to Arduino so please excuse the easy question and guide me to the appropriate sources or forums. I just bought an Arduino Uno Starter Kit that comes with the "Arduino Projects Book" by ...
2
votes
2answers
3k views

Linux can not open arduino IDE - java.lang.NullPointerException

I use arch linux. I installed arduino ide with pacman. When I try to run it, loading window will show for few socends and than program crashes. There are logs: john@arch-thinkpad ~ [1]> arduino ...
2
votes
6answers
6k views

Convert my if loop code into a switch/case statement

I have made a project where in photosensors constantly read value and if laser is cut by external object, then it beeps the buzzer. A switch case would make it easy, as suggested by some people. I ...
2
votes
8answers
21k views

Getting “avrdude:stk500_recv(): programmer is not responding” while uploading sketch to Arduino Pro Mini

I recently bought an Arduino Pro Mini(3.3V 328p, 8MHz) along with a CP2102 USB to TTL UART convertor. When I try to upload a sketch to the Pro Mini using it, I get a avrdude:stk500_recv(): programmer ...
2
votes
2answers
17k views

How to setup OpenCV with Arduino?

My question is how to do it (set it up), not if I can do it or with what Arduino. I've previously setup OpenCV with Visual Studio 2015. It was a tough one, but I made it through. Now I want to set it ...
2
votes
3answers
3k views

How to include <SPI.h> outside the .ino file

As I understand, Arduino IDE considers two paths for the libraries: first, "C:\Program Files\Arduino\libraries" and second, the "libraries" folder next to the schetchbook. I have a ...
2
votes
2answers
2k views

Most memory efficient way to program

I currently know 3 ways to do a program. Which one of them is the most memory friendly. Note that the example code is simple (blinking a led) and the final code will be VERY VERY complex. Also, the ...
2
votes
3answers
1k views

Constructing my own serial command syntax to control arduino

I know this is a basic question, but as a hardware electronics guy and not a programmer I cannot seem to fathom how to do this - so any examples of code would be greatly appreciated: I want the ...
2
votes
2answers
9k views

NodeMCU (Arduino IDE) 'DynamicJsonBuffer' was not declared in this scope

#include <Arduino.h> #include <ESP8266WiFi.h> #include <ESP8266WiFiMulti.h> #include <ArduinoJson.h> #include <ESP8266HTTPClient.h> #define USE_SERIAL Serial ...
2
votes
1answer
15k views

How to Sort Elements of Array in Arduino Code? [closed]

/How Can i Sort this Array with Descending Order? I need Simplest syntax to use in iterative code. lt[6]={35,15,80,2,40,110};
2
votes
1answer
7k views

pass class internal function as callback

I am trying to pass a class internal function as a callback function within the class. The error behavior is similar to this problem. Whatsoever, I was unable to construct working code based on that ...
2
votes
2answers
5k views

How much numerical precision can the ESP8266 achieve?

Background: I am trying to port this solar tracker code by Gabriel Miller to run on the ESP8266. Now I'm not a particularly great coder, but I'd like to give it an honest try. As of recently, the ...
2
votes
2answers
446 views

How do I change the default LED pin for displaying uploading

I made a board for my project based on Arduino Pro Mini. The problem is, that I had to put the LED on pin 4 instead of pin 13. What setting do I have to change to make pin 4 the default one? Or do I ...
2
votes
2answers
3k views

Installing Arduino IDE on Linux

I downloaded arduino-1.8.4-linux32.tar.xz and ran install.sh as outlined (the very sketchy instructions) in https://www.arduino.cc/en/Guide/Linux This seemed to work OK, so I removed 354M of what I ...
2
votes
2answers
2k views

Can't open “COM1” on Linux with Trinket Pro

At work, on a Ubuntu 14.04 system, I can access my Trinket Pro without any difficulty whatsoever. At home, using either Linux Mint or Ubuntu across two laptops, I can not communicate with the device ...
2
votes
2answers
3k views

Arduino serial plotter with independent Y axis, is it possible?

The Arduino IDE has a built in functionality that allows the user to plot a value (such as temperature) over time. I would like to plot two variables with different ranges on the y-axis (pressure ...
2
votes
3answers
5k views

Cheap ATtiny programmer on Debian

I've recently purchased a no-brand 1€ ATtiny programmer off eBay, and with the ridiculous price obviously came no documentation nor support from the seller. At first I thought that using it with the ...
2
votes
2answers
651 views

Why PJ0 and PJ1 are not reporting as PCINT pins

When the sketch shown at end-of-question is compiled and uploaded to an Arduino board, it is supposed to Serial-print a list of available digital pins, showing for each pin whether it supports PWM or ...
2
votes
1answer
594 views

Arduino Command Line Interface - How to change boardsmanager.additional.urls

I am building a Travis CI job to test my Arduino Library and it needs to install external board definitions. Is there a way that I can set the boardsmanager.additional.urls from the command prompt ...
2
votes
1answer
37 views

Conditional compilation depending on sizeof(double)

Is there a macro (#define ...) somewhere in the bowels of Arduino IDE or core header files which tells me at compile time(!), if the double data type for a given platform/board is a true double ...
2
votes
2answers
543 views

How to create a 1 hour timer with ATtiny13A microcontroller?

I want to control an AC load such that it powered on for 1 minute, then off for 1 hour, then on again for 1 min, and so on, in a loop. I just modified the blink sketch to do: Turn A1 on Then delay ...
2
votes
3answers
76 views

Using Two Arduino to Lower Power Consumption

I am planning to build a water quality sensor with ph, temperature, and dissolved oxygen, conductivity. The power consumption looks like it will be very high especially due to the signal isolator, I'm ...
2
votes
2answers
2k views

Arduino Nano 33 IOT issue

Nano 33 IOT is not detecting by windows . When i plug the usb cable only green light on the board. Board is installed from the board manager. the cable is usb DATA cable and not charging cable. I ...
2
votes
3answers
1k views

Arduino-IDE “while (!Serial)”

I have a Question regarding Arduino IDE: Many old Arduino setup examples states that the Serial.begin() function always should begin with : Serial.begin(9600); // (or 115200) while (!Serial) { ...
2
votes
1answer
48 views

`LOW` being defined as `0` and `HIGH` being defined as `1` - is this a part of external specification?

Arduino.h defines LOW as 0x0 and HIGH as 0x1. Does the Arduino API intend to expose that fact? Does it guarantee that this will always be that way? In other words, what is the intended purpose of ...
2
votes
2answers
1k views

Setting pinMode(pin,input/output) as per user requirement

I am working on arduino IDE and esp8266 nodemcu. As i am going through the IDE I saw that there is a structure of void loop() and void setup() and all examples in the internet included defining the ...
2
votes
7answers
15k views

Better cycling through the RGB colors

I have been trying to achieve a way to tap into the 16 million colors RGB provides for this LED strip. I thought of using LEDS.setBrightness(); but I have not been successful in my attempts. I have ...
2
votes
2answers
2k views

How do I deal with this Arduino IDE installation error?

I am using Linux Fedora 20 (yes I am going to upgrade it, definitely, soon) and I have installed arduino-1.8.0, but I get this message ... Your copy of the IDE is installed in a subfolder of your ...
2
votes
3answers
445 views

Why do I get a compiler error when I'm pretty sure I have such method?

Code (I've omitted much of the code, and left just the outline and code probably relating to the error.) SelfDrivingCar.ino #include "JKMain.h" void setup() { JKMain::setup(); } void loop() { ...
2
votes
2answers
137 views

How does an 8bit MCU make use of data-types over 8bits?

how does an 8bit MCU handle 16bit output? How does an 8bit MCU store values higher than 8bits? I am using an attiny, on an adafruit trinket. and other 8bit MCUs. http://www.atmel.com/devices/attiny85....
2
votes
2answers
22k views

Multiple client server over wifi

Trying to setup a server on Arduino to support multiple clients, I am able to support one but I don't want to flush that client to make another connection. #include <ESP8266WiFi.h> const char* ...
2
votes
3answers
300 views

Arduino Debounce Sketch

I want to use 4 Push Buttons and 4 leds in my project. What do I need to change in my sketch for multiple input push buttons and multiple outputs of leds? So my sketch is only for one push button and ...
2
votes
2answers
3k views

Adding Attiny to Arduino IDE - attiny\variants\platform.txt file missing

I followed this guide to program AtTiny using Arduino as ISP. The problem is that it has some file missing: java.io.FileNotFoundException: C:\...\arduino-1.6.8\hardware\attiny\variants\platform.txt ...
2
votes
2answers
3k views

How to access Attiny84 port B in Arduino IDE code?

Referring to guide at High-low tech, I were able to flash ATTiny84 via UNO through Arduino IDE 1.6.7. I loaded a simple blink LED program on IDE pin 0 (physical Attiny84 pin 13, PA0) and everything ...
2
votes
1answer
4k views

Build arduino with windows command line

Can someone explain, step by step, along with all software I must use for using Windows command prompt to build an Arduino sketch (.ino file )? I've followed these steps but I can't.
2
votes
2answers
495 views

Crash when serving static files width ESP8266WebServer

For the past two days, I've been trying to set up an ESP8266WebServer to serve my static web app files from SPIFFS. But as soon as I make a call to serveStatic, the ESP crashes. This is the exact code ...
2
votes
1answer
607 views

Using Serial.begin() twice

I'm training kids programming Arduino. We're gonna use Serial for debugging purposes, so we started with a simple HelloWorld program. I let them try various stuff, including changing the speed. Now, ...
2
votes
3answers
6k views

Convert byte* to int in Arduino

I am trying to convert byte* value to int here is how I have it. void mqttCallback(char* topic, byte* payload, unsigned int length) { String topicStr = topic; int* payload_value; int ...
2
votes
1answer
11k views

Get ESP32 Chip ID into a string variable (Arduino/C++ newbie here)

It's just a few days since I started using Arduino IDE ( programming an ESP32 ). As I learn, I am trying to write some snippets. I wanted to store the Chip ID of ESP32 into a variable (preferably ...
2
votes
3answers
201 views

Having some issues with an array

I am having an issue that I can't seem to get my head wrapped around. What I am trying to accomplish is to have a minutes worth of sensor data in an array (reading every 5 seconds) so I'll have 12 ...
2
votes
1answer
4k views

How to post JSON data from Arduino?

I want to post data that I'm getting from the sensor every 5 seconds to my application in JSON format. Initially, I'm getting data as int and converting into String. For example: if data=15, it is ...
2
votes
1answer
1k views

Error: `nullptr` was not declared in this scope. Arduino IDE

I try to use this ArduinoThread library. In the Arduino I go Sketch->Import Library->ArduinoThread. After that I have the following line in the beginning of the sketch: #include <...
2
votes
5answers
36k views

error: espcomm_upload_mem failed when uploading a sketch

I am new to the whole arduino scene. I have connected my wifi module (esp8266 v01) to my arduino Uno like this: http://www.teomaragakis.com/hardware/electronics/how-to-connect-an-esp8266-to-an-...
2
votes
1answer
4k views

ESP8266 UDP multicast doesn't receive packets

I am currently working on an ESP8266 with the Arduino IDE. I try to implement an ESP8266 in STA mode as multicast receiver. I was writing my code with the help of this documentation. Especially the ...
2
votes
1answer
863 views

Pause in the program for some time

I have a variable timeInSec which records the time as loop begins. It is defined as timeInSec = millis();. I have two conditions. If (timeInSec - lastRun)< 5 (that is 5 sec) , the first condition ...
2
votes
1answer
7k views

How to display extended ASCII characters, e.g., the standard degree symbol, DEC 167, on the Serial Monitor [not LCD]?

I spent an afternoon researching this, and read a lot of material, but with no successful results. [I really thought this would be a trivial task.] Is this problem Windows, or WIN10, specific, as ...
2
votes
1answer
394 views

Linking Arduino and Matlab

My project is based on controlling a moving fan using different hand gestures. I am using image processing toolbox from matlab to detect and identify various hand movements.I want to link my matlab ...
2
votes
2answers
2k views

How do I configure the Arduino IDE to look for source code in a subdirectory within the directory that holds my sketch?

I'm writing an Arduino program that contains various .h and .cpp files. Due to organizational needs, I have configured the directory that contains my Arduino sketch (.ino) to possess a subdirectory. ...
2
votes
1answer
1k views

ESP8266 Nodemcu create custom PWM with 1.25us resolution

I am trying to control some SMD LEDs WS2812B with the ESP8266-Nodemcu. I am using Arduino environment for coding. Actually I am trying to accomplish a PWM that is precisely able to: Go High for ...
2
votes
3answers
13k views

Digispark / DigiKeyboard change keyboard layout

I'm trying to use the Digispark as a Rubber Ducky but the Digispark is only usable with the US laylout. German keyboard layout is QWERTZ. Some keys can be changed, like y and z, but if there are [ or ]...

1 2 3
4
5
29