![]() #include "nrf8001-ble-uart-spark-io/serial_evt.h" #include "nrf8001-ble-uart-spark-io/rbc_mesh_interface.h" #include "nrf8001-ble-uart-spark-io/boards.h" Let's go through it step by step: #include "nrf8001-ble-uart-spark-io/lib_aci.h" The main programming logic is written in the sketch file. The program can then be flashed to the device. We add the library "nrf8001-ble-uart-spark-io" with the needed drivers and the example sketch file by clicking "Libraries" -> "nrf8001-ble-uart-spark-io" -> "ble-mesh-cloud.ino" -> "use this example". We then can create the app for the device. Once it is done you can load a small example code like the "Blink an LED" app to the spark to check if all is working correctly. Now write down the Particle device ID which you need later. First you need to go through this tutorial to get your spark core conected to the Wi-Fi and associated with your account. Programming the Particle can be done in a browser using Particles web IDE. The access address and channel can be changed to fit your application needs. The nRF51-Dongles together with the nRF51-DK form a mesh at BTLE channel 38 with the access address oxa541a68f but due to endianness we will have to write it the other way around in our application later. The state of each one is given by a mesh handle, which can be read and written over the interface. We can use many nRF51-Dongles or nRF51-DKs forming a BLE-mesh (The nRF51-DKs do not have RGB LEDs). REQN is basicly the slave select while RDYN is used to inidcate the master that the slave is ready for transmission. You might have noticed the REQN and RDYN lines. If you connect them with wires, connect the following lines:īridge the solder bridge SB17 on the nRF51-DK The Particle board also powers the nRF, so plug-in the USB connector only to the Particle.io board. To connect the Particle and the nRF51-DK you can use a nRF5x Adapter Shield or connect them through wires. The Particle device should, after some initialization ritual, connect automatically to the local Wi-Fi and can be programmed over the spark.io web IDE. write and read handle values) and to execute them. The hex files for the nRF51 contain SPI and BLE mesh drivers that allow it to receive commands for the mesh (e.g. (See section 7 of the nRF8001 specification.) The Mesh commands supported are explained at They are connected through a 5 wire SPI bus, similar to the SPI connection used to interface a Nordic nRF8001. It consists of a nRF51-DK board for the BLE part and a Particle Core for the Wi-Fi part. These commands go to the Particle cloud from where they are automatically redirected to our Particle Core.Ĭommunication from web-based cloud to BLE is done through a gateway, which can speak BLE to the one side and Wi-Fi to the other. We can send commands as HTTP requests through the html file. To build these hex files, use the directions in the readme file of the project and define the board which you want to use in the project file. The project contains a compile target "nRF51822 xxAA serial" for the nRF-DK used as the gateway and the target "nRF51822 xxAA" for the nRF51-Dongles used as mesh nodes. (the last two bullet points are the same for softdevice v7 and v8) nRF51-Dongle and nRF51-DK both have softdevice S110 v8.0.nRF51-DK(PCA10028) flashed with rbc_gatt_serial_BOARD_PCA10028.hex.nRF51-Dongle(PCA10031) flashed with rbc_gatt_BOARD_PCA10031.hex.Check the branch SDK-8-support of the github project nrf51-ble-bcast-mesh for the sources and use the latest release (v0.6.10-SD8) for the new hex files for the development kit and the dongle. Now you can also use softdevice S110 v8.0 and SDK 8. ![]() ![]() The hex files for the nRF51 and the dongle were both compiled from the nrf51-ble-bcast-mesh.
0 Comments
Leave a Reply. |