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
0
votes
1answer
50 views

I keep getting this error exit status 1 expected ';' before 'DigiKeyboard'

\ here is my code include "DigiKeyboard.h" void setup() { DigiKeyboard.sendKeyStroke(0); DigiKeyboard.delay(100); DigiKeyboard.sendKeyStroke(MOD_GUI_LEFT); DigiKeyboard.delay(100); ...
0
votes
1answer
50 views

How are libraries added to the Arduino library manager?

Who curates the list of libraries in the Tools / Manage Libraries menu, and what is the procedure for submitting code for consideration?
0
votes
1answer
86 views

pubsubclient won't compile in Arduino and VSCode IDEs

I've compiled successfully a year ago in Arduino IDE, but lately I'm getting fatal errors: /Users/davidjeffers/Documents/Arduino/libraries/PubSubClient/src/PubSubClient.cpp: At global scope: /Users/...
1
vote
0answers
63 views

Trying to use Timer0 on Arduino Mega

I've recently been looking at Timers and I'm trying to generate a PWM frequency at 250000Hz using Timer0 on PIN 4. When I set OCR0A = 63 I get nothing from the light however when I set OCR0A = 125 it ...
2
votes
2answers
500 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 ...
1
vote
2answers
80 views

Gratuitious instantiation of `Serial`, why?

Let's take a very simple sketch, any simple one-.ino sketch. Say, just a led blinker like this void setup() { pinMode(LED_BUILTIN, OUTPUT); digitalWrite(LED_BUILTIN, LOW); } void loop() { ...
0
votes
1answer
1k views

HTTP POST from Arduino/ESP8266/ESP32 How to send parameters (x-www-form-urlencoded)

EDIT: Thank you for the answer, also we had figured out how to do it Micropython too - I believe that it is relevant for the Arduino/ESP8266/ESP32 community to share this too. https://github.com/...
0
votes
1answer
560 views

How to get the free/used space on a SD card and transmit it

I'm using this block of code to read and sum up the bytes of all the text files I have on an SD card: long get_sd_memory_taken() { File dir = SD.open("/"); long sd_memory_taken; int c = 0; ...
0
votes
1answer
495 views

ESP32 on Arduino IDE: Identify the board type in code (preprocessor macro)

I have read the answers on this post, but they do not seem to be providing a solution for ESP32 boards. Is there a way to get the .name that is used from the boards.txt without modifying the platform....
1
vote
1answer
737 views

SCLK pulses not seen when using SPI on ESP32

I am using the following code in my esp32 using arduino IDE for spi communication which is an example code - #include <SPI.h> static const int spiClk = 1000000; // 1 MHz //uninitalised ...
1
vote
0answers
202 views

Client.available remains empty (0)

i use the "client.availbale" to check incoming data on the (mkr1010) client coming from (mkr1010) server but it always contains "0". Serial printing (monitor) it on server works. It looks as if the ...
1
vote
0answers
27 views

sending numbers from server to client (arduino mkr1010)

I want to send basic information from a server to a client. 4 numbers representing a random sequence for example 0100. I have put this in byte array and use the "server.write" to send it to the ...
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 ...
1
vote
0answers
438 views

The Arduino Oscilloscope - Error message: 'ADCSRA' was not declared in this scope

Project: The Arduino Oscilloscope - published in The MagPi No. 71 July 2018 This is my first Arduino project! I'm porting over the sketch "Gather_A0.ino" but I'm encountering compile errors: Error ...
0
votes
1answer
151 views

No Websockets Server for Arduino mkr1010?

I've seen some interesting explanations on using websocket comms on mkr 1010 but it's always handling the mkr 1010 as the client and the server being always a computer or some other "non-arduino" ...
0
votes
2answers
738 views

Error compiling for board Arduino Nano

I have multiple Arduino Nano boards. I am able to compile or upload code only once. If I try to compile/upload again I get an error: "Error compiling for board Arduino Nano". However there is a ...
0
votes
1answer
72 views

Uno - error during uploading with library

I'm writing the code in VS Code on IO Platform. Yesterday i finished my code and uploaded it to the Arduino Uno. It works fine. Next day i launched the VS Code and i changed the code a bit, then i ...
2
votes
0answers
37 views

Split string using a delimiter then saving to different variables [duplicate]

I have a string that looks something like this "43;27;42;27". It is the data from 4 DHT22 temperature sensors, i need to splice this string every ";" and save the number to a variable. In the end, I ...
0
votes
1answer
531 views

Button debounce using millis() in this example

I have been trying to find a way to use millis() instead of delay(), in order to press 2 buttons to turn on and off a blue led. EDITED: const int right_button = 8, left_button = 9, yellow_led = 7, ...
0
votes
1answer
2k views

Checking size in flash memory Esp32

I recently purchased an Esp32 and am doing some tests using Arduino IDE. In one of the tests, I am recording a lot of .txt files with some text inside them in the flash memory, however, I would like ...
-1
votes
1answer
36 views

Serial monitor reading input strings, but cannot stop a while statement

I have just learned something called 'communication protocols' in Arduino, while I was testing this code, it appears to me that every time I input a string "YELLOW_ON" while statement works perfectly ...
0
votes
2answers
44 views

If condition not working as expected

In the last condition in else if (see code marked with ***), I am not getting my screen with the laser/specklke fail, if both failflag 1 and failgflag 5 is there, however it shows me laser fail ...
0
votes
1answer
72 views

Connecting a FireBeetle ESP32 to Arduino

I have a very basic question, because I struggle to upload files to my FireBeetle ESP32 Board. When I try to upload to the board I get an A fatal error occurred: Failed to connect to ESP32: Timed ...
-1
votes
1answer
300 views

Reading bmp images from SD card, converting it and displaying it on serial monitor in Arduino

Can someone please help me write code that can read a 24-bit BMP file from an SD card, save converted to 8-bit BMP internally, and display the 8-bit BMP pixel values on Arduino terminal as a 2D matrix....
0
votes
2answers
561 views

Reading from SPIFFS - What's the best way to deal with a string (or char) array with undefined length?

I've read that it's best to avoid using String in Arduino so I'm ready to use a char array if it's better. I'm reading the file names from an SD Card and my goal is to store them in an array and then ...
2
votes
1answer
120 views

Remove blocking delay() toneMelody function?

I would like to change the delay() into a nonblocking function in the code below. I've implemented it (a part of a tutorial from arduino.cc) in my code, but the delay() is blocking the rest of my code....
1
vote
0answers
112 views

FTDI Unrecognized USB device

I connected my FTDI (FT232RL) to my PC, windows 8.1. And it gave me a notification saying "USB device not recognized". However, I thought that the problem is from the cable that I am using to connect ...
0
votes
2answers
470 views

Can we use ESP32 to program ESP32-CAM through ESP-IDF

Can we just use an ESP32 NodeMCU for example to program an ESP32-CAM? I saw a lot of people programming ESP32-CAM using an arduino Uno, can we do the same for ESP32 NodeMCU? Of course, in the "Arduino ...
1
vote
0answers
98 views

Serial Monitor shows random texts While Reading Data from RTC DS3231 with Arduino Uno

I tried to set time on a RTC DS3231. After Uploading it with Arduino IDE, I try viewing the output in the Serial Monitor. However, if I start viewing the Serial Monitor, It starts showing encrypted ...
0
votes
2answers
69 views

Weird behavior of variables when replacing for loops with if statement

See the picture of serial monitor showing I get a large number, 4 billion, when I multiply two called functions together. It always happens after 53 if I change the amount the if statement counts to. ...
0
votes
1answer
69 views

Http request in interrupt esp8266 not working

So i have this code that whenever i click a button a interrupt starts. In this interrupt i want to do a get request to a webserver. The thing is seperate the code, the interrupt code works and ...
0
votes
2answers
154 views

Check if the board is in sleep mode

I'm using seep sleep mode with UNO with a simple sketch that turning on an LED and then goes to sleep. as far as the ATmega328p datasheet in sleep mode part showing the wake up sources and deactivated ...
1
vote
0answers
20 views

How to properly pass struct as argument? [duplicate]

This is my first question! i'm sorry if i'm doing something wrong. I'm trying to write a code that blinks some leds, but i cant quite work out how to use structs as arguments. This is the code: void ...
2
votes
2answers
672 views

sleep mode and watchdog at the same time

suppose a project with Arduino that we should save battery power, so we use sleep mode and also avoiding the Arduino of hanging and use watchdog timer. But the problem is here that when the Arduino ...
0
votes
0answers
157 views

Fingerprint not detected

I'm currently trying to integrate my ESP32 Module (as in https://cdn.instructables.com/FOL/YWLI/JEOILQ5U/FOLYWLIJEOILQ5U.LARGE.jpg) with Fingerprint Sensor(R307) using the Adafruit Fingerprint Library....
0
votes
1answer
71 views

connected between 2 arduino

i want to connect SPI 2 arduino master and slave through the MUX , to write and read in external memory , when the master write in memory slave read . pls help . code to master #include <SPI.h&...
-1
votes
1answer
52 views

Summarizing a repetitive code in a void loop function

How can I summarize dozens of code lines for blinking a red LED in Arduino Rich Shield? Is there a way or method to eliminate at least half of the code for repetitive scenarios? const int redPin = 4; ...
1
vote
2answers
59 views

Reading out two sensors via Com-Port at the same time

I have two Arduino Nano Every and a sensor connected to each of them. Here is what's happening: I upload the sketch to the first Arduino on Com4 and see its output is correct via the Serial Monitor I ...
0
votes
0answers
639 views

Stm32 Blue Pill Internal ADC Voltage Reference Configuration

I am programming an STM32F103C8T6 Board in Arduino IDE. I want to change the value of the internal Voltage Reference for the ADC. How can I achieve this in Arduino ide?
0
votes
1answer
378 views

How to create large progmem arrays and not annoy the linker

I have a rather complex project (PlatformIO, but I've also had this happen in the vanilla IDE) with several nested includes. Let's say that there are three files and a main sketch. The main sketch ...
1
vote
1answer
699 views

Arduino Firebase connection refused error

I am making a project for school where I have to send data from a sensor to a webpage. After doing some research I decided to use a Real-Time Firebase database. Security is not really important and I ...
1
vote
0answers
61 views

While Loop does not stop when condition is false

Here's the code: void loop() { while (1 == 1) { ObsLeft(); while (SeeLeft < 50 || SeeLeft == 50) { Urong(); ObsLeft(); if (SeeLeft > 50) { Hinto; ...
1
vote
0answers
255 views

Can't find a #include

I'm using the Marlin 2.0.3 for a 3D printer project. I'd like to tear apart the code, but I don't see a #include to anything in the Marlin.ino, Configuration.h, Configuration_adv.h, nor Version.h. If ...
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 ...
0
votes
0answers
276 views

Unable to upload code on Arduino Nano on Manjaro Linux [duplicate]

I try to upload the Blink sketch. I can successfully upload on Windows but not on Manjaro Linux. I'm using Arduino IDE 1.8.12. In Boards Manager Arduino AVR Boards version 1.8.2 is installed I tried ...
1
vote
0answers
48 views

Motors working with Ultrasonic Sensor and Servo as expected?

So, I tried making an Arduino Project(Controlling Motors by Remote and Ultrasonic Sensor would activate Servo when the distance is less than 50cm). I am trying to build a project, A remote controlled ...
0
votes
2answers
353 views

problem with decrement in a loop

I am trying to write a sketch wherein the led brightness increases in increments of 15 until it reaches 255. At that point I want to make decrements of 15 until it reaches 0. The increment part of the ...
1
vote
0answers
260 views

StaticJsonBuffer is a class from ArduinoJson 5 error

I am trying to upload data from a DHT11 sensor to a firebase database. I am following this guide: https://circuitdigest.com/microcontroller-projects/sending-temperature-and-humidity-data-to-firebase-...
1
vote
1answer
112 views

Task watchdog gets triggered during Bluetooth initialization

The board ESP32-Dev-WROOM-32D cannot establish a bluetooth connection due to the task watchdog. Here's my code: #include "BluetoothSerial.h" //check if Bluetooth is enabled #if !defined(...
0
votes
1answer
44 views

Gauss solver for IIR filter

I write a piece of code in online GDB using c++, the code calculates some coefficients for a IIR filter which tries to approximate a fractional derivative and integral for a fractional PID control. ...

1
4 5
6
7 8
29