6 votes

reading device or board specific properties from the Arduino MKR WiFi 1010 device

The IDE shows the serial number so I looked into the SAMD core and found the function which reads the serial number from registers. It is in the CDC.cpp file uint8_t Serial_::getShortName(char* name) {...
Juraj's user avatar
  • 18k
4 votes
Accepted

Arduino IDE equivalent to DataView?

There is no use for a DataView in the Arduino environment. In the JavaScript language, a string and an array of bytes are two very different things. That's why you need something like this str2DV() ...
Edgar Bonet's user avatar
4 votes

We have Arduino IDE code that needs to stop after a set number of "revolutions"

if (counter >= 2) { return; //exit the loop } The return statement will end the loop, but the loop function is called over and over repeatedly. So it will just start over again. There are a ...
Delta_G's user avatar
  • 3,270
3 votes
Accepted

A fatal error occurred: Could not open /dev/ttyUSB0, the port doesn't exist (UART bridge CP2102)

A post by Bee_HapBee on Reddit solved my issue! Thank you! sudo chmod 666 /dev/ttyUSB0 Yep, I wish esptool.py would've told me that I needed permissions, rather than the port doesn't exist
44yu5h's user avatar
  • 139
3 votes

Nema 17 stepper motor speed problem

Stepper motors need to be gradually brought up to speed. If you try to go from zero rpm to anything over a few hundred rpm they will often just sit there and hum. Try AccelStepper (https://www.arduino....
Brian Robertson's user avatar
3 votes

Read values from a txt file on an SD card

These symbols were introduced in the Arduino AVR core 1.6.7, in December 2015. You can find them in Stream.h. They are probably defined in other cores too. For some reason, the Teensy cores do not ...
Edgar Bonet's user avatar
3 votes
Accepted

Importing content of text file as string into Arduino code

For ESP32 (and ESP8266), you can partition part of the Flash memory to be used as the file system and creating a data/ folder in your project for storing files. Take a look at arduino-esp32littlefs-...
hcheung's user avatar
  • 1,361
2 votes

How to upload already compiled code when no changes were made?

This is what I have done. In the arduino IDE settings panel, turn on the "Show verbose output during compile and upload". This way whenever you are doing verify and upload you can see all ...
windmaomao's user avatar
2 votes

Does ESP32 can support WIFIDirect

I do know that you can host a web page on an esp8266, sending and receiving data on that. You can from there connect the Android to that web page. I am not sure what you mean by access point, and I ...
Iliketurtles's user avatar
2 votes
Accepted

MD5 of File doesnot match data in flash Error with ESP32 S3

Yes, I have managed to get it working now, the issue encountered was with the strapping pins. Specifically, Pin 45 of ESP32S3 is responsible for configuring VDD_SPI_FLASH. To ensure it operates at 3....
NINJA's user avatar
  • 51
2 votes
Accepted

LED doesn't completely turn off with digitalWrite(led, LOW);

if (!digitalRead(led3) && difference>=600){ digitalWrite(led3, HIGH); } if (!digitalRead(led4) && difference>=800){ digitalWrite(led4, HIGH); } if (difference>=1000){ ...
Nick Gammon's user avatar
  • 38.2k
2 votes
Accepted

ESP8266 seems to be killing a while loop

You can't trap an ESP in a while loop like that. There are things it needs to get back to main and do between loops. Instead, let the loop function be your loop. Make the while statements if ...
Delta_G's user avatar
  • 3,270
2 votes

Why Arduino IDE is brignging wrong board name for ESP32 S3

You can just force Arduino IDE to recognise your board by locating your Boards Configuration File, putting in your VID and PID values, repackage and host the configurations and Point the Arduino IDE ...
b1n3t's user avatar
  • 286
2 votes

How to use Interrupt in Arduino to receive the data from Serial Input

Why do you want to use an interrupt anyway? The serial hardware already generates an interrupt, and inside that ISR the incoming byte is placed into a buffer. I presume you have a main loop where you ...
Nick Gammon's user avatar
  • 38.2k
2 votes

Having an issue conveying array values properly

Yes, if you send 5 bytes to the Arduino then they will arrive one at a time. When the 4th byte arrives then the if (Serial.available() == 4 ) statement is true and it runs that code. That code reads ...
Delta_G's user avatar
  • 3,270
2 votes

Having an issue conveying array values properly

I have a post here which discusses handling incoming serial data. Also here on Stack Exchange. For handling serial input like you are trying to do I suggest using an "end of line marker" ...
Nick Gammon's user avatar
  • 38.2k
2 votes

ESP32 SPI Mutual Communication

For ESP32, unless the exact board variant is specified, by default the macros for MISO, MOSI, SCK and SS are defined as follows and are used for VSPI(i.e. SPI0): static const uint8_t SS = 5; static ...
hcheung's user avatar
  • 1,361
2 votes

Importing content of text file as string into Arduino code

Try using the C++ Raw String Literal. It's in the form of const char *myLiteralText=R"abc123~~~( this is literal text which includes all spaces and newlines )abc123~~~" The ...
jsotola's user avatar
  • 1,515
2 votes
Accepted

Removing the L from F_CPU in assembly

You have an XY problem: You want to busy-wait some cycles depending on the system's clock frequency. You think you can realize that with (inline) assembly and a repetition macro. But as you found, the ...
the busybee's user avatar
  • 2,002
2 votes

Removing the L from F_CPU in assembly

Just as a complement to the busybee's answer: the avr-libc provides the macros _delay_ms() and _delay_us() for busy-wait delays. Internally, they use __builtin_avr_delay_cycles() and F_CPU to provide ...
Edgar Bonet's user avatar
1 vote

Ubuntu - TinyISP is not recognized

Have you installed the libusb? sudo apt-get install libusb-1.0-0-dev
Nuno Santos's user avatar
1 vote
Accepted

reading device or board specific properties from the Arduino MKR WiFi 1010 device

MAC address could be of use to you, but remember that it can be spoofed. Aside from that Serial and Model numbers are not accessible from software layer. Here is a simple implementation for fetching ...
b1n3t's user avatar
  • 286
1 vote
Accepted

Why Arduino IDE is brignging wrong board name for ESP32 S3

After an Arduino IDE update 2.2, something was solved, yesterday (30,08,2023). There is a new edit button appearing on the board selection menu and then Arduino ide recognises esp32 even after ...
mehmet's user avatar
  • 287
1 vote

Read binary file on SD card

Your loop seems to be out-by-one. I would prefer: vector<unsigned char> text; unsigned char textseg; while (in_file.available()){ in_file.read(&textseg,1); text.push_back(...
Nick Gammon's user avatar
  • 38.2k
1 vote

Using file.seek() with arduino ide

According to https://www.arduino.cc/reference/en/libraries/sd/seek/ : SD - seek() Seek to a new position in the file, which must be between 0 and the size of the file (inclusive). Syntax file.seek(pos)...
Nick Gammon's user avatar
  • 38.2k
1 vote

Initialize ATMEGA32U4 with arduino bootloader with AVR Dragon?

You don't need another Arduino if you have a programmer, but there is some problem with the AVR Dargon programmer and avrdude so the Arduino boards package and the MiniCore boards package don't have ...
Juraj's user avatar
  • 18k
1 vote

Arduino OTA - difference between Arduino IDE and PlatformIO

All I can see are three issues (plus possible some bonus ones) You can't daisy chain callback setters like that, it returns void and it doesn't make any sense to have void.onProgress... and those ...
KIIV's user avatar
  • 4,742
1 vote

Errors when trying to connect esp8266 to firebase

fixed by downgrading my esp8266 version to 2.7
NyK's user avatar
  • 51
1 vote

NodeMCU code that both display OLED and control WS2812 LED Ring

You need to stop using delay and instead keep track of elapsed time. One of the comments under your question suggests looking at the BlinkWithoutDelay example, which is part of the Arduino IDE. The ...
Nick Gammon's user avatar
  • 38.2k

Only top scored, non community-wiki answers of a minimum length are eligible