Angus Gratton
2f249edb8e
Use std::abs for a float-compatible abs() function (#2738)
* Other Arduino cores uses a macro to redefine libc abs() to take any type, meaning abs(-3.3) == 3.3 not the normal libc result of 3. * 1e4bf14a3 (#1783) replaced similar min, max macros with c++ stdlib. However this change includes <algorithm> after the line which defines the abs() macro. <algorithm> includes <cstdlib> which undefines abs() and re-defines it. * This means abs() becomes the plain libc version again which only takes integers, so abs(-3.3) == 3. As reported here: https://github.com/espressif/esp-idf/issues/3405 This fix tries to keep in the spirit of #1783 by using libstdc++. The other option would be to include <cstdlib> before defining the abs() macro, so it doesn't get undef-ed again later on.
Arduino core for ESP32 WiFi chip
Need help or have a question? Join the chat at
Contents
- Development Status
- Installation Instructions
- Decoding Exceptions
- Issue/Bug report template
- ESP32Dev Board PINMAP
Development Status
Most of the framework is implemented. Most noticable is the missing analogWrite. While analogWrite is on it's way, there are a few other options that you can use:
- 16 channels LEDC which is PWM
- 8 channels SigmaDelta which uses SigmaDelta modulation
- 2 channels DAC which gives real analog output
Installation Instructions
- Using Arduino IDE Boards Manager (preferred)
- Using Arduino IDE with the development repository
- Using PlatformIO
- Building with make
- Using as ESP-IDF component
- Using OTAWebUpdater
Decoding exceptions
You can use EspExceptionDecoder to get meaningful call trace.
Issue/Bug report template
Before reporting an issue, make sure you've searched for similar one that was already created. Also make sure to go through all the issues labelled as for reference.
Finally, if you're sure no one else had the issue, follow the ISSUE_TEMPLATE while reporting any issue.
ESP32Dev Board PINMAP
Hint
Sometimes to program ESP32 via serial you must keep GPIO0 LOW during the programming process
Description
Languages
C
77.6%
C++
21.6%
Python
0.7%