Testing Aftermath

After concluding testing on basic functionality earlier this week with positive results , it was time to dig into the real work... developing a protocol that would allow this Bluetooth LE breakout board to be used to transmit sensor data in a convenient and uniform way across the "Internet Of Agriculture" project . In addition, a second nRF08001 module was set up, and experimenting with two modules began.

Phase one - understanding the "out of the box" software

Before trying to construct an entire comprehensive script from scratch,  I thought it would be worth my time to familiarize myself with what others have done in some of the demo codes I explored here on Github.  

The code currently running on the two Arduinos (found here) has be modified slightly by myself but in general the  framework is done using universal asynchronous receiver/transmitter (UART)  protocol , where the data format and transmission speeds are configurable. The electric signaling levels and methods (such as differential signaling, etc.) are handled by a driver circuit external to the UART, in our case an Ardiuno uno, and eventually something as small as an Adafruit Pro Trinket . In other words, the UART takes one channel to transmit data and one to receive it.  

UART Sketch in detail (Part 1)

Initialization

Like most Arduino sketches the first step is to initialize the device in question (in our case the Arduino or Pro Trinket), and prepare the hardware for the data its about to send and receive. You'll need to include the header files and define the pins used. Since we're using hardware SPI, the CLK/MOSI and MISO pins are fixed (see wiring scheme in "Getting Started with the nFR08001" blog). 

the RDY pin is the only pin that must be an interrupt pin. We'll use 2, most Arduino's can use 2 or 3.

Then create the Adafruit_BLE_UART object at the top as shown below. 

 

These few lines of code are enough to get the Arduino oriented to the hardware and are the first steps to begin further use of the BLE module.

Unfortunately due to time constraints and hardware not cooperating, this is as far as we got this week. However, further exploration will continue.    

- Tom DeBell, Beginning Researcher Support Program researcher