|
| 1 | +# Additional Libraries and Compatibility |
| 2 | + |
| 3 | +This page lists Arduino libraries known to work with the STM32 core and |
| 4 | +community-reported library tests. Compatibility can vary by library version, |
| 5 | +board, STM32 device, and connected hardware; check the linked project |
| 6 | +documentation for details. Contributions with additional tested combinations |
| 7 | +are welcome. |
| 8 | + |
| 9 | +## Official Arduino libraries |
| 10 | + |
| 11 | +- [TFT](https://github.com/arduino-libraries/TFT/): use release [1.0.6](https://github.com/arduino-libraries/TFT/releases/tag/1.0.6) or later; otherwise use [Ucglib_Arduino](https://github.com/olikraus/Ucglib_Arduino) |
| 12 | +- [LiquidCrystal](https://github.com/arduino-libraries/LiquidCrystal) |
| 13 | +- [Ethernet](https://github.com/arduino-libraries/Ethernet) |
| 14 | +- [WiFi](https://github.com/arduino-libraries/WiFi) |
| 15 | + |
| 16 | +## Community-tested libraries |
| 17 | + |
| 18 | +| Library | Reported test | |
| 19 | +| --- | --- | |
| 20 | +| [arduino-LoRa](https://github.com/sandeepmistry/arduino-LoRa) | Tested with B-L072Z-LRWAN1 | |
| 21 | +| [Firmata](https://github.com/firmata/arduino) | Supported since release 2.5.7 | |
| 22 | +| [OneWire](https://github.com/PaulStoffregen/OneWire) | Library for Dallas/Maxim 1-Wire chips | |
| 23 | +| [PubSubClient](https://github.com/knolleary/PubSubClient) | Tested on L475 Discovery IoT using Wi-Fi | |
| 24 | +| [RTClib](https://github.com/adafruit/RTClib) | Tested with Adafruit module 3296 | |
| 25 | +| [Ucglib_Arduino](https://github.com/olikraus/Ucglib_Arduino) | Tested with ST7735 | |
| 26 | +| [UIPEthernet](https://github.com/UIPEthernet/UIPEthernet) | Tested with ENC28J60 module | |
| 27 | + |
| 28 | +## Library compatibility |
| 29 | + |
| 30 | +When a library needs to distinguish STM32duino from other Arduino cores, use |
| 31 | +the `ARDUINO_ARCH_STM32` preprocessor macro. The core defines it when compiling |
| 32 | +for STM32duino. For example: |
| 33 | + |
| 34 | +```cpp |
| 35 | +#if defined(ARDUINO_ARCH_STM32) |
| 36 | +// STM32duino-specific code |
| 37 | +#endif |
| 38 | +``` |
| 39 | + |
| 40 | +See the [FAQ example](../FAQ.md#how-do-i-know-which-stm32duinolibmaple-core-am-i-running-on) |
| 41 | +for how this macro distinguishes STM32duino from the legacy libmaple core. |
0 commit comments