2

The simple answer is "libraries". Every time you start the application, all files inside your library folder are parsed. And this is not done over your OS, but over the Java-Virtual Machine. So it is not just slow, it is ultra-slow! Since your antivirus will probably also check each file. Once, all files was read (maybe 1/2 of the time spent by your ...


2

(Answering in more detail, as this is the top search hit for "ESP8266 Vin", at least for me) TL;DR: Vin is NOT directly connected to USB power. There is a protection diode between USB+/VU and Vin, which has a limited current capacity. If your board provides VU, that one is directly connected to USB power. As long as you only power 1-2 tiny devices, it ...


2

EEPROM on the ESP32 doesn't work like you would expect. It uses the SDK's "Non-Volatile Ram" storage system to store the data within the nvs partition. This works through a system of "Key / Value" pairs, and the data is stored as a "BLOB" (Binary Large OBject) for the key eeprom in the namespace eeprom. Quite what the internal layout of the data within ...


1

There is not enough context to be certain, but given the variable names I can assume that this is code from a sketch that receives information from an RC controller and is intended to control parts of some form of flying craft. So with that in mind, let's take this line: flapmag=(pwm_value-880)/41.0+10; I assume that this is to calculate the amount the ...


1

I use the Arduino IDE to 'build' everything. However, in case of a bigger project, I use a 'decent' code editor (Visual Studio in my case) to edit, and the Arduino IDE to build. Also, because I prefer testing all non-Arduino related code on the PC (not on the Arduino), the Visual Studio (C++) project uses some stub classes I created (specifically for my ...


1

You can use the millis function to check the current 'time'. If you store this, and later call this function again, by subtracting you can see how much time has been passed. so instead of delay(500) you use if (millis() - timeStamp >= 500) { ... to continue your code. As others said in comments, you also need to debounce to prevent multiple button ...


1

On the ESP8266 flash is a very special case. Because the ESP8266 itself does not have any flash, but instead uses an external SPI-connected flash chip, accessing it is not an easy or technically obvious operation. Reading from the flash chip is slow. Very very slow (by comparison to reading RAM). Because of this where possible certain things are copied ...


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