TinyCircuits

TinyShield_NRF8001_BLE_Example + TinyScreen device conflict

TinyShield_NRF8001_BLE_Example + TinyScreen device conflict
« on: September 20, 2015, 04:00:53 AM »
Hi,

Trying to build a simple wireless sensor control, passing values/variable back and forth over BLE to iPhone, using tiny screen to display status of wireless sensor.

Working from TinyShield_NRF8001_BLE_Example adding Tinyscreen functionality to sketch seemed easiest way to implement something that also writes back (not only reads).

However, writing to screen stalls NRF8001. In first instance, app writes BLE status to screen and consequently stops NRF8001 from working/discoverable

Thanks in advance,

Re: TinyShield_NRF8001_BLE_Example + TinyScreen device conflict
« Reply #1 on: September 29, 2015, 03:35:37 PM »
Hi,

Both boards use SPI for data, but the NRF8001 uses a different bit order. You'll need to make sure it's correct before transferring data to the baord.

The smartwatch example on codebender at https://codebender.cc/sketch:91833 is set up to use both at the same time, so it's a good place to start. If you look at UART.h, you'll see calls to SPI.setBitOrder()- passing LSBFIRST at the beginning, MSBFIRST at the end. You'll need do this before/after calls to functions like lib_aci_send_data().

Let me know how this goes for you,
Ben