u-blox NINA-W10 Arduino example + SHT31 temperature and humidity + Bluetooth BLE
- Install PlatformIO Core
- Download development the repository with examples
- Extract ZIP archive
- Run these commands:
# Change directory to example
> cd Arduino-u-blox-NINA-W10
# Build project
> platformio run
# Upload firmware
> platformio run --target upload
# Build specific environment
> platformio run -e nina_W10
# Upload firmware for the specific environment
> platformio run -e nina_W10 --target upload
# Clean build files
> platformio run --target clean
- Assing defined PIN for connection;
- Stop advertising;
This example tries to implement some key functions and key PIN atributes in order to get you started with using Arduino and the Multiradio board u-blox NINA-W10.
BLE roles are a bit confusing, at least to me, Neil Kolban the same person behind the ESP32 BLE Lib
has made some material available on his YouTube Channel
Basicaly:
- Peripheral -> Advertises
- Central -> Scans for Peripherals
- GATT Server -> Device which has the database and provide resources to the Client. PS. Server does not send data, unless Client requests.
- GATT Client -> Access remote Server resources.
Generally, Peripheral = Server. Therefore if you're working on a end device, an activity tracker for example, it's likely to be set as a Peripheral.
- Two examples are provided:
- In order to test this example, NINA-W10 (Central/Client) connects to NINA-B1 (Peripheral/Server) via s-center and write the SHT31 temperature to the
FFE1
characteristics and humidity to2A6F
.
-
You can create a custom partitions table (CSV) following ESP32 Partition Tables documentation.
-
Partitions examples are available at GitHub arduino-esp32
-
minimal.csv
is the default defined on nina_w10.json however I changed it in order to free some space up used by spiffs found onpartitions_custom.csv
here- No OTA;
- No SPIFFS;
- No EEPROM;
pio run -t erase
- > all data will be replaced with 0xFF bytes.
- The nRF Connect for Mobile App from Nordic Semiconductor can alse be used in order to communicate and learn more about BLE and its details:
- You can download the sample Bluetooth low energy app - BLE App straight from u-blox wesite: https://www.u-blox.com/en/product/bluetooth-ios-and-android-app
Github Shields and Badges created with Shields.io
Adafruit SHT31 Library
ESP32 BLE Arduino Library