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.
1,581 questions
1
vote
0
answers
449
views
Connect Arduino + ESP8266 to Azure IoT Hub Device via X509 certificate
I would like to connect ESP8266 with Azure IoT Hub Device via X509 certificate. Currently, I can connect using the symmetric key connection to my device, but I have devices that I want to authenticate ...
-1
votes
1
answer
163
views
How do you remove a number of characters from a parsed string?
Using this code - advertisedDevice.getServiceDataUUID().toString().c_str()); returns the following string -
0000feaa-0000-1000-8000-00805f9b34fb
How can I adjust the code to do that it omits the first ...
1
vote
2
answers
2k
views
Define a custom baudrate in Serial Monitor
Is there a way to define a different baud rate from the ones we are shown in the dropdown menu of the Serial Monitor? I want to define a custom value.
0
votes
1
answer
137
views
Will the atmega8-U2 work with Arduino IDE
I use a homemade board that hosts a PIC16F1829 and an ATmega328P on the same board. We use the ATmega328P with the Arduino IDE and the PIC with the MPLABX IDE for about 100 EE students a semester at ...
2
votes
2
answers
439
views
Where should unit tests go in the Arduino IDE
I have an Arduino project where the file structure looks like this
myProject/
myProject.ino
ImportantClass1.hpp
ImportantClass1.cpp
ImportantClass2.hpp
ImportantClass2.cpp
...
3
votes
1
answer
1k
views
ESP8266 - Can't upload or use Serial Monitor - Ubuntu 22.04 LTS
When trying to use the ESP8266 Node MCU or Multiple Feather Huzzah's I get the following error. I can program Arduino Uno & Mega without issue.
warning: espcomm_sync failed
error: espcomm_open ...
1
vote
1
answer
824
views
Requires accurate RGB color values by the tcs3200 RGB color sensore
I used the TCS3200 sensor to read the RGB color values.First, I calibrated the sensor with white and black colors.The sensor detects red, blue, and green correctly, but does not give an accurate value....
1
vote
3
answers
4k
views
How to do multiple serial.read()
first of all im new here and im really sorry if there's some mistakes when im making this question. So im trying to make a program to calculate using serial read, and im going to input a lot of values....
2
votes
1
answer
2k
views
Nema 17 stepper motor speed problem
This code is quoted from here. May I know how to increase the speed of the NEMA 17 stepper motor further? I tried to increase the step speed to 2000rpm but it does not even work. It only works for ...
0
votes
1
answer
2k
views
ESP32: why does malloc can only alloc 126888 bytes with 402540 bytes heap?
I need a buffer of the size 153600 bytes in my ESP32 project, but I could not create a static buffer in code nor can I malloc the buffer.
The ESP32 itself reports:
ESP.getHeapSize() // = 402540
...
1
vote
0
answers
764
views
Can no longer select a port in Arduino IDE on Linux?
I am trying to upload to my Elegoo Mega 2560. I previously had it set up properly with the board installed and selected and the port automatically detected.
Now when I go to Tools and hover my mouse ...
2
votes
1
answer
169
views
Can I flash hoodloader2 or HEX files on Arduino Simulators?
I want to make a HID Keyboard out of Arduino UNO, in UNO board the script runs perfectly fine, but the UNO board requires me to flash it every-time I want to put in a new script in it, so can I do the ...
2
votes
1
answer
2k
views
Can you write c code in arduino ide?
So i know that the native arduino language is written in c/c++, but does that mean that i can write pure c code in the arduino ide, or that i have to use the arduino specified language? I’m new to ...
5
votes
1
answer
414
views
VSCode vs. Arduino IDE - same program, different behavior
I've got this simple program for testing DS18B20 temperature sensors.
#include "OneWire.h"
#include "DallasTemperature.h"
#define ONE_WIRE_BUS D3
// Setup a oneWire instance to ...
0
votes
1
answer
397
views
Is there accurate connection procedure for connection between an esp32 and ultrasonic sensor(HC-SR04)? [closed]
I am currently working on a project which integrates esp32 and HC-SR04 and send the data from HC-SR04 to my own domain. The connection diagram is this
And the code which I use is this,
const int ...
1
vote
2
answers
2k
views
uint8_t issues when linking libraries outside of INO file
I've been trying to start my project out split into multiple files, knowing it will grow. I was templating it off of how I've done C++ files in the past: classes in an individual .h/.cpp pair and ...
2
votes
2
answers
1k
views
Read & Write to EEPROM
I need to implement EEPROM Read & Write functionality to my project.
I've been learning how to use the EEPROM on the last few days, however I'm struggling to Read & Write Strings to EEPROM.
...
-2
votes
1
answer
445
views
passing variable to function
I have the following code to turn on or off led. I would like to modify the function to pass the pin as well. what should X be substituted with?
#define BIN_LED 2
#define PIN_LED 3
void led(uint8_t x,...
-2
votes
1
answer
198
views
How can I get an external program to change values inside the Arduino C++ code? [closed]
How can I get some constantly changing values from a separate C++ program entered and uploaded into the Arduino?
I notice when I upload code to the Arduino in the IDE it takes about a second to start ...
1
vote
0
answers
891
views
avrdude: ser_open(): can't set com-state for "\\.\COM4" [duplicate]
My Arduino code is not getting uploaded. It gives me "avrdude: ser_open(): can't set com-state for "\.\COM4" error. It worked literally 5 mins ago. now it doesn't work. I updated the ...
1
vote
1
answer
156
views
Why i am not getting the decimal number as output? The code is explained with the help of comments
// Defined three array arr0,arr1,arr2
int arr0[] = {0, 0, 0, 0, 0, 0, 0, 0};
int arr1[] = {0, 0, 0, 0, 0, 0, 0, 0};
int arr2[] = {0, 0, 0, 0, 0, 0, 0, 0};
//cord function takes binary number array as ...
0
votes
1
answer
316
views
how to put whitespace in long Serial println() input [closed]
I have this long, Serial.println() that is in quotes, on multiple lines.
Arduino IDE warns: "Missing terminating character".
I am certain there is a way to break the lines up, while having ...
1
vote
0
answers
271
views
Arduino IDE Java error
I'm running IDE version 1.8.16 under Windows 10.
Frequently I get the error message. The situation is solved only when exiting the IDE. Afterwards the compilation may be finished with or without ...
0
votes
1
answer
195
views
String operations printing random character on Serial Monitor
I want to extract the file name MyFile.txt out of a path which is stored in a string "C:\\MyDirectory\\MyFile.txt";
I found a simple c code which does the job.
string filename = "C:\\...
1
vote
0
answers
817
views
Nodemcu Lolin v3 Timeout error
I am getting the Arduino console error "the selected serial port serial.serialutil.SerialTimeoutException: Write timeout
does not exist or your board is not connected". I recently upgraded ...