Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

Data acquisition with nRF52832 Bluefruit Feather card
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: Data acquisition with nRF52832 Bluefruit Feather card

by Samou on Wed Jul 22, 2020 11:19 am

Hello;
while looking for a simpler method to recover the data received by bluetooth, I found the Putty software, I don't know that it is possible to make the direct transmission with the adafruit feather NRF52 card?

Thanks.

Samou
 
Posts: 25
Joined: Thu May 07, 2020 12:19 pm

Re: Data acquisition with nRF52832 Bluefruit Feather card

by Samou on Tue Aug 18, 2020 12:32 pm

Hello;
I succeeded in modifying the BLEUART code to read the analog PIN A5, but the problem is that I receive strange characters, I tried to modify to have the value of the voltage in milivolt but I could not (I use bleufruit android app),
would it be possible to directly display the data in decimal?

Code: Select all | TOGGLE FULL SIZE
#include <bluefruit.h>
#include <Adafruit_LittleFS.h>
#include <InternalFileSystem.h>

// BLE Service
BLEDfu  bledfu;  // OTA DFU service
BLEDis  bledis;  // device information
BLEUart bleuart; // uart over ble
BLEBas  blebas;  // battery
int adcin = A5;
int  adcvalue = 0;
float mv_per_lsb = 3600.0F/1024.0F; // 10-bit ADC with 3.6V input range
void setup()
{
  Serial.begin(115200);

#if CFG_DEBUG
  // Blocking wait for connection when debug mode is enabled via IDE
  while ( !Serial ) yield();
#endif
 
  Serial.println("Bluefruit52 BLEUART Example");
  Serial.println("---------------------------\n");

  // Setup the BLE LED to be enabled on CONNECT
  // Note: This is actually the default behaviour, but provided
  // here in case you want to control this LED manually via PIN 19
  Bluefruit.autoConnLed(true);

  // Config the peripheral connection with maximum bandwidth
  // more SRAM required by SoftDevice
  // Note: All config***() function must be called before begin()
  Bluefruit.configPrphBandwidth(BANDWIDTH_MAX);

  Bluefruit.begin();
  Bluefruit.setTxPower(4);    // Check bluefruit.h for supported values
  Bluefruit.setName("Bluefruit52");
  //Bluefruit.setName(getMcuUniqueID()); // useful testing with multiple central connections
  Bluefruit.Periph.setConnectCallback(connect_callback);
  Bluefruit.Periph.setDisconnectCallback(disconnect_callback);

  // To be consistent OTA DFU should be added first if it exists
  bledfu.begin();

  // Configure and Start Device Information Service
  bledis.setManufacturer("Adafruit Industries");
  bledis.setModel("Bluefruit Feather52");
  bledis.begin();

  // Configure and Start BLE Uart Service
  bleuart.begin();

  // Start BLE Battery Service
  blebas.begin();
  blebas.write(100);

  // Set up and start advertising
  startAdv();

  Serial.println("Please use Adafruit's Bluefruit LE app to connect in UART mode");
  Serial.println("Once connected, enter character(s) that you wish to send");
}

void startAdv(void)
{
  // Advertising packet
  Bluefruit.Advertising.addFlags(BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE);
  Bluefruit.Advertising.addTxPower();

  // Include bleuart 128-bit uuid
  Bluefruit.Advertising.addService(bleuart);

  // Secondary Scan Response packet (optional)
  // Since there is no room for 'Name' in Advertising packet
  Bluefruit.ScanResponse.addName();
 
  /* Start Advertising
   * - Enable auto advertising if disconnected
   * - Interval:  fast mode = 20 ms, slow mode = 152.5 ms
   * - Timeout for fast mode is 30 seconds
   * - Start(timeout) with timeout = 0 will advertise forever (until connected)
   *
   * For recommended advertising interval
   * https://developer.apple.com/library/content/qa/qa1931/_index.html   
   */
  Bluefruit.Advertising.restartOnDisconnect(true);
  Bluefruit.Advertising.setInterval(32, 244);    // in unit of 0.625 ms
  Bluefruit.Advertising.setFastTimeout(30);      // number of seconds in fast mode
  Bluefruit.Advertising.start(0);                // 0 = Don't stop advertising after n seconds 
}

void loop()
{
 while (adcin>0)
 {
  int  adcvalue = analogRead(adcin);
  float  ad=((float)adcvalue * mv_per_lsb);
    // Delay to wait for enough input, since we have a limited transmission buffer
    delay(2);

    bleuart.write(ad);
  }
}

// callback invoked when central connects
void connect_callback(uint16_t conn_handle)
{
  // Get the reference to current connection
  BLEConnection* connection = Bluefruit.Connection(conn_handle);

  char central_name[32] = { 0 };
  connection->getPeerName(central_name, sizeof(central_name));

  Serial.print("Connected to ");
  Serial.println(central_name);
}

/**
 * Callback invoked when a connection is dropped
 * @param conn_handle connection where this event happens
 * @param reason is a BLE_HCI_STATUS_CODE which can be found in ble_hci.h
 */
void disconnect_callback(uint16_t conn_handle, uint8_t reason)
{
  (void) conn_handle;
  (void) reason;

  Serial.println();
  Serial.print("Disconnected, reason = 0x"); Serial.println(reason, DEC);
}

I send a photo of what I receive in my phonehttps://drive.google.com/file/d/10m4gezLtFdD3sqWmMiU0fTtrpsg0uWUm/view?usp=sharing


thanks

Samou
 
Posts: 25
Joined: Thu May 07, 2020 12:19 pm

Re: Data acquisition with nRF52832 Bluefruit Feather card

by adafruit_support_bill on Tue Aug 18, 2020 2:02 pm

Your google drive is not public. We cannot access your images.

adafruit_support_bill
 
Posts: 78709
Joined: Sat Feb 07, 2009 10:11 am

Re: Data acquisition with nRF52832 Bluefruit Feather card

by Samou on Wed Aug 19, 2020 2:53 am

Hello,

Sorry, I sent a new link.

Image

Thanks

Samou
 
Posts: 25
Joined: Thu May 07, 2020 12:19 pm

Re: Data acquisition with nRF52832 Bluefruit Feather card

by Samou on Wed Aug 19, 2020 3:00 am


Samou
 
Posts: 25
Joined: Thu May 07, 2020 12:19 pm

Re: Data acquisition with nRF52832 Bluefruit Feather card

by adafruit_support_bill on Wed Aug 19, 2020 7:22 am

I don't have the components here to reproduce it, but I suspect that the problem is here:

Code: Select all | TOGGLE FULL SIZE
   bleuart.write(ad);


Generally, for serial devices, 'write' transmits binary data.
https://www.arduino.cc/reference/en/lan ... ial/write/

Try using print() instead:
https://www.arduino.cc/reference/en/lan ... ial/print/

adafruit_support_bill
 
Posts: 78709
Joined: Sat Feb 07, 2009 10:11 am

Re: Data acquisition with nRF52832 Bluefruit Feather card

by Samou on Thu Aug 20, 2020 5:13 am

Hello,
first thanks for the quick replies :).

I corrected the program, the code works but not exactly what i want to have, it seems the loop only works once, the first value i get repeats every time even if i change the input value i have to click on rest each time to have the new values at the input of port A0, I don't know how to switch each time to a new input value (read analog port continuously)


Code: Select all | TOGGLE FULL SIZE
/*********************************************************************
 This is an example for our nRF52 based Bluefruit LE modules
 Pick one up today in the adafruit shop!
 Adafruit invests time and resources providing this open source code,
 please support Adafruit and open-source hardware by purchasing
 products from Adafruit!
 MIT license, check LICENSE for more information
 All text above, and the splash screen below must be included in
 any redistribution
*********************************************************************/
#include <bluefruit.h>
#include <Adafruit_LittleFS.h>
#include <InternalFileSystem.h>

// BLE Service
BLEDfu  bledfu;  // OTA DFU service
BLEDis  bledis;  // device information
BLEUart bleuart; // uart over ble
BLEBas  blebas;  // battery

int adcin = A0;
int  adcvalue = analogRead(adcin);
float mv_per_lsb = 3600.0F/1024.0F; // 10-bit ADC with 3.6V input range
int non= 222;

void setup()
{
  Serial.begin(115200);

#if CFG_DEBUG
  // Blocking wait for connection when debug mode is enabled via IDE
  while ( !Serial ) yield();
#endif
 
  Serial.println("Bluefruit52 BLEUART Example");
  Serial.println("---------------------------\n");

  // Setup the BLE LED to be enabled on CONNECT
  // Note: This is actually the default behaviour, but provided
  // here in case you want to control this LED manually via PIN 19
  Bluefruit.autoConnLed(true);

  // Config the peripheral connection with maximum bandwidth
  // more SRAM required by SoftDevice
  // Note: All config***() function must be called before begin()
  Bluefruit.configPrphBandwidth(BANDWIDTH_MAX);

  Bluefruit.begin();
  Bluefruit.setTxPower(4);    // Check bluefruit.h for supported values
  Bluefruit.setName("Bluefruit52");
  //Bluefruit.setName(getMcuUniqueID()); // useful testing with multiple central connections
  Bluefruit.Periph.setConnectCallback(connect_callback);
  Bluefruit.Periph.setDisconnectCallback(disconnect_callback);

  // To be consistent OTA DFU should be added first if it exists
  bledfu.begin();

  // Configure and Start Device Information Service
  bledis.setManufacturer("Adafruit Industries");
  bledis.setModel("Bluefruit Feather52");
  bledis.begin();

  // Configure and Start BLE Uart Service
  bleuart.begin();

  // Start BLE Battery Service
  blebas.begin();
  blebas.write(100);

  // Set up and start advertising
  startAdv();

  Serial.println("Please use Adafruit's Bluefruit LE app to connect in UART mode");
  Serial.println("Once connected, enter character(s) that you wish to send");
}

void startAdv(void)
{
  // Advertising packet
  Bluefruit.Advertising.addFlags(BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE);
  Bluefruit.Advertising.addTxPower();

  // Include bleuart 128-bit uuid
  Bluefruit.Advertising.addService(bleuart);

  // Secondary Scan Response packet (optional)
  // Since there is no room for 'Name' in Advertising packet
  Bluefruit.ScanResponse.addName();
 
  /* Start Advertising
   * - Enable auto advertising if disconnected
   * - Interval:  fast mode = 20 ms, slow mode = 152.5 ms
   * - Timeout for fast mode is 30 seconds
   * - Start(timeout) with timeout = 0 will advertise forever (until connected)
   *
   * For recommended advertising interval
   * https://developer.apple.com/library/content/qa/qa1931/_index.html   
   */
  Bluefruit.Advertising.restartOnDisconnect(true);
  Bluefruit.Advertising.setInterval(32, 244);    // in unit of 0.625 ms
  Bluefruit.Advertising.setFastTimeout(30);      // number of seconds in fast mode
  Bluefruit.Advertising.start(0);                // 0 = Don't stop advertising after n seconds 
}

void loop()
{
 int adcin = A0;
 float  ad=((float)adcvalue * mv_per_lsb);
 while (true)
 {
  uint8_t buf[64];
  int count = Serial.readBytes(buf, sizeof(buf));
  bleuart.write( buf, count );
  if (adcvalue==0)
  {
    delay(2);
    bleuart.print(non);
    Serial.print("T1");
    }
    else
    {
      int adcin = A0;
      float  ad=((float)adcvalue * mv_per_lsb);
      delay(2);
      bleuart.print(ad);
      Serial.print("T2");
    }
    delay(500);
 }
}

// callback invoked when central connects
void connect_callback(uint16_t conn_handle)
{
  // Get the reference to current connection
  BLEConnection* connection = Bluefruit.Connection(conn_handle);

  char central_name[32] = { 0 };
  connection->getPeerName(central_name, sizeof(central_name));

  Serial.print("Connected to ");
  Serial.println(central_name);
}

/**
 * Callback invoked when a connection is dropped
 * @param conn_handle connection where this event happens
 * @param reason is a BLE_HCI_STATUS_CODE which can be found in ble_hci.h
 */
void disconnect_callback(uint16_t conn_handle, uint8_t reason)
{
  (void) conn_handle;
  (void) reason;

  Serial.println();
  Serial.print("Disconnected, reason = 0x"); Serial.println(reason, HEX);
}


thanks

Samou
 
Posts: 25
Joined: Thu May 07, 2020 12:19 pm

Re: Data acquisition with nRF52832 Bluefruit Feather card

by adafruit_support_bill on Thu Aug 20, 2020 6:03 am

Code: Select all | TOGGLE FULL SIZE
int  adcvalue = analogRead(adcin);


You are only doing one analogRead at global scope. If you want the value to update in the loop you have to move the analogRead into the loop.

adafruit_support_bill
 
Posts: 78709
Joined: Sat Feb 07, 2009 10:11 am

Re: Data acquisition with nRF52832 Bluefruit Feather card

by Samou on Thu Aug 20, 2020 8:25 am

the loop works correctly now thanks :).

I have a question : for saving data, I saw in the "Bluefruit Connect" application that I can send the file by email but manually (The problem is that we cannot control the parameters recording).
I want to know if it is possible to save a file on (data, txt, csv) to phone or cloud space directly, so that I can recover the data ?

thanks.

Samou
 
Posts: 25
Joined: Thu May 07, 2020 12:19 pm

Re: Data acquisition with nRF52832 Bluefruit Feather card

by adafruit_support_bill on Thu Aug 20, 2020 9:20 am

My guess is that it would be possible. But that is more of an Android Studio question which is not our main area of expertise. There are several active Android developer communities that could probably help you out with that:

https://androidforums.com/forums/androi ... opment.28/
https://stackoverflow.com/questions/tag ... oid-things
https://www.hackster.io/google/products/android-things

adafruit_support_bill
 
Posts: 78709
Joined: Sat Feb 07, 2009 10:11 am

Re: Data acquisition with nRF52832 Bluefruit Feather card

by Samou on Thu Aug 20, 2020 9:30 am

OK;
thanks for all :).

Samou
 
Posts: 25
Joined: Thu May 07, 2020 12:19 pm

Re: Data acquisition with nRF52832 Bluefruit Feather card

by Samou on Wed Aug 26, 2020 5:45 am

Hello,

I have a question about the maximum number of samples/second, I need the maximum sample (of data possible), I remove the time in my loop and I change the resolution to 14-bit.
but or final I always have only 100 samples / seconds.

i need more then 100 data/ second, my question is it possible to vary the number of acquisition / second ? if yes how i can do it ?

Attached my program.
Code: Select all | TOGGLE FULL SIZE
/*********************************************************************
 This is an example for our nRF52 based Bluefruit LE modules
 Pick one up today in the adafruit shop!
 Adafruit invests time and resources providing this open source code,
 please support Adafruit and open-source hardware by purchasing
 products from Adafruit!
 MIT license, check LICENSE for more information
 All text above, and the splash screen below must be included in
 any redistribution
*********************************************************************/
#include <bluefruit.h>
#include <Adafruit_LittleFS.h>
#include <InternalFileSystem.h>

// BLE Service
BLEDfu  bledfu;  // OTA DFU service
BLEDis  bledis;  // device information
BLEUart bleuart; // uart over ble
BLEBas  blebas;  // battery
int adcin = A0;
int  adcvalue = analogRead(adcin);
float mv_per_lsb = 3600.0F/16384.0F; // 10-bit ADC with 3.6V input range

void setup()
{
  pinMode(A0, INPUT);
  Serial.begin(115200);

#if CFG_DEBUG
  // Blocking wait for connection when debug mode is enabled via IDE
  while ( !Serial ) yield();
#endif
 
  Serial.println("Bluefruit52 BLEUART Example");
  Serial.println("---------------------------\n");

  // Setup the BLE LED to be enabled on CONNECT
  // Note: This is actually the default behaviour, but provided
  // here in case you want to control this LED manually via PIN 19
  Bluefruit.autoConnLed(true);

  // Config the peripheral connection with maximum bandwidth
  // more SRAM required by SoftDevice
  // Note: All config***() function must be called before begin()
  Bluefruit.configPrphBandwidth(BANDWIDTH_MAX);

  Bluefruit.begin();
  Bluefruit.setTxPower(4);    // Check bluefruit.h for supported values
  Bluefruit.setName("Bluefruit52");
  //Bluefruit.setName(getMcuUniqueID()); // useful testing with multiple central connections
  Bluefruit.Periph.setConnectCallback(connect_callback);
  Bluefruit.Periph.setDisconnectCallback(disconnect_callback);

  // To be consistent OTA DFU should be added first if it exists
  bledfu.begin();

  // Configure and Start Device Information Service
  bledis.setManufacturer("Adafruit Industries");
  bledis.setModel("Bluefruit Feather52");
  bledis.begin();

  // Configure and Start BLE Uart Service
  bleuart.begin();

  // Start BLE Battery Service
  blebas.begin();
  blebas.write(100);

  // Set up and start advertising
  startAdv();

  Serial.println("Please use Adafruit's Bluefruit LE app to connect in UART mode");
  Serial.println("Once connected, enter character(s) that you wish to send");
}

void startAdv(void)
{
  // Advertising packet
  Bluefruit.Advertising.addFlags(BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE);
  Bluefruit.Advertising.addTxPower();

  // Include bleuart 128-bit uuid
  Bluefruit.Advertising.addService(bleuart);

  // Secondary Scan Response packet (optional)
  // Since there is no room for 'Name' in Advertising packet
  Bluefruit.ScanResponse.addName();
 
  /* Start Advertising
   * - Enable auto advertising if disconnected
   * - Interval:  fast mode = 20 ms, slow mode = 152.5 ms
   * - Timeout for fast mode is 30 seconds
   * - Start(timeout) with timeout = 0 will advertise forever (until connected)
   *
   * For recommended advertising interval
   * https://developer.apple.com/library/content/qa/qa1931/_index.html   
   */
  Bluefruit.Advertising.restartOnDisconnect(true);
  Bluefruit.Advertising.setInterval(32, 244);    // in unit of 0.625 ms
  Bluefruit.Advertising.setFastTimeout(30);      // number of seconds in fast mode
  Bluefruit.Advertising.start(0);                // 0 = Don't stop advertising after n seconds 
}


    void loop()
    {
     while (true)
     {
     
          int adcin = A0;
          int  adcvalue = analogRead(adcin);
          float  ad=((float)adcvalue * mv_per_lsb);
          Serial.print(ad);
          Serial.print(";");
          Serial.println(millis());
          //delay(2);
          bleuart.print(ad);                 
          //Serial.print("T2");
          //delay(1000);
     }
    }
   

// callback invoked when central connects
void connect_callback(uint16_t conn_handle)
{
  // Get the reference to current connection
  BLEConnection* connection = Bluefruit.Connection(conn_handle);

  char central_name[32] = { 0 };
  connection->getPeerName(central_name, sizeof(central_name));

  Serial.print("Connected to ");
  Serial.println(central_name);
}

/**
 * Callback invoked when a connection is dropped
 * @param conn_handle connection where this event happens
 * @param reason is a BLE_HCI_STATUS_CODE which can be found in ble_hci.h
 */
void disconnect_callback(uint16_t conn_handle, uint8_t reason)
{
    (void) conn_handle;
    (void) reason;

  Serial.println();
  Serial.print("Disconnected, reason = 0x"); Serial.println(reason, HEX);
}





Thanks.

Samou
 
Posts: 25
Joined: Thu May 07, 2020 12:19 pm

Re: Data acquisition with nRF52832 Bluefruit Feather card

by adafruit_support_bill on Wed Aug 26, 2020 6:00 am

You can try eliminating all of the serial overhead in your loop. But ultimately, your maximum transmission rate will be limited by the BLE protocol. And that is determined in part by the BLE implementation on your master device. For more information on that topic see:
https://punchthrough.com/maximizing-ble ... d-android/

adafruit_support_bill
 
Posts: 78709
Joined: Sat Feb 07, 2009 10:11 am

Re: Data acquisition with nRF52832 Bluefruit Feather card

by Samou on Mon Aug 31, 2020 10:08 am

Hello,

I use this code for receiving data with my phone (I know I can just receive 6 data every 30ms with iphone 8) :
Code: Select all | TOGGLE FULL SIZE
/*********************************************************************
 This is an example for our nRF52 based Bluefruit LE modules
 Pick one up today in the adafruit shop!
 Adafruit invests time and resources providing this open source code,
 please support Adafruit and open-source hardware by purchasing
 products from Adafruit!
 MIT license, check LICENSE for more information
 All text above, and the splash screen below must be included in
 any redistribution
*********************************************************************/
#include <bluefruit.h>
#include <Adafruit_LittleFS.h>
#include <InternalFileSystem.h>

// BLE Service
BLEDfu  bledfu;  // OTA DFU service
BLEDis  bledis;  // device information
BLEUart bleuart; // uart over ble
BLEBas  blebas;  // battery
int adcin = A0;
int  adcvalue = analogRead(adcin);
float mv_per_lsb = 3600.0F/1024.0F; // 10-bit ADC with 3.6V input range

void setup()
{
  pinMode(A0, INPUT);
  Serial.begin(115200);

#if CFG_DEBUG
  // Blocking wait for connection when debug mode is enabled via IDE
  while ( !Serial ) yield();
#endif
 
  //Serial.println("Bluefruit52 BLEUART Example");
  //Serial.println("---------------------------\n");

  // Setup the BLE LED to be enabled on CONNECT
  // Note: This is actually the default behaviour, but provided
  // here in case you want to control this LED manually via PIN 19
  Bluefruit.autoConnLed(true);

  // Config the peripheral connection with maximum bandwidth
  // more SRAM required by SoftDevice
  // Note: All config***() function must be called before begin()
  Bluefruit.configPrphBandwidth(BANDWIDTH_MAX);

  Bluefruit.begin();
  Bluefruit.setTxPower(4);    // Check bluefruit.h for supported values
  Bluefruit.setName("Bluefruit52");
  //Bluefruit.setName(getMcuUniqueID()); // useful testing with multiple central connections
  Bluefruit.Periph.setConnectCallback(connect_callback);
  Bluefruit.Periph.setDisconnectCallback(disconnect_callback);

  // To be consistent OTA DFU should be added first if it exists
  bledfu.begin();

  // Configure and Start Device Information Service
  bledis.setManufacturer("Adafruit Industries");
  bledis.setModel("Bluefruit Feather52");
  bledis.begin();

  // Configure and Start BLE Uart Service
  bleuart.begin();

  // Start BLE Battery Service
  blebas.begin();
  blebas.write(100);

  // Set up and start advertising
  startAdv();

  //Serial.println("Please use Adafruit's Bluefruit LE app to connect in UART mode");
  //Serial.println("Once connected, enter character(s) that you wish to send");
}

void startAdv(void)
{
  // Advertising packet
  Bluefruit.Advertising.addFlags(BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE);
  Bluefruit.Advertising.addTxPower();

  // Include bleuart 128-bit uuid
  Bluefruit.Advertising.addService(bleuart);

  // Secondary Scan Response packet (optional)
  // Since there is no room for 'Name' in Advertising packet
  Bluefruit.ScanResponse.addName();
 
  /* Start Advertising
   * - Enable auto advertising if disconnected
   * - Interval:  fast mode = 20 ms, slow mode = 152.5 ms
   * - Timeout for fast mode is 30 seconds
   * - Start(timeout) with timeout = 0 will advertise forever (until connected)
   *
   * For recommended advertising interval
   * https://developer.apple.com/library/content/qa/qa1931/_index.html   
   */
  Bluefruit.Advertising.restartOnDisconnect(true);
  Bluefruit.Advertising.setInterval(32, 244);    // in unit of 0.625 ms
  Bluefruit.Advertising.setFastTimeout(30);      // number of seconds in fast mode
  Bluefruit.Advertising.start(0);                // 0 = Don't stop advertising after n seconds 
}

 
    void loop()
    {
     while (true)
     {
         
          int adcin = A0;
          int  adcvalue = analogRead(adcin);
          float  ad=((float)adcvalue * mv_per_lsb);
         // Serial.print(ad);
          //Serial.print(";");
          //Serial.println(millis());
          bleuart.print(ad);               
          //Serial.print("T2");
          //delay(1);
     
     }
     
    }
   

// callback invoked when central connects
void connect_callback(uint16_t conn_handle)
{
  // Get the reference to current connection
  BLEConnection* connection = Bluefruit.Connection(conn_handle);

  char central_name[32] = { 0 };
  connection->getPeerName(central_name, sizeof(central_name));

  ////Serial.print("Connected to ");
  //z.println(central_name);
}

/**
 * Callback invoked when a connection is dropped
 * @param conn_handle connection where this event happens
 * @param reason is a BLE_HCI_STATUS_CODE which can be found in ble_hci.h
 */
void disconnect_callback(uint16_t conn_handle, uint8_t reason)
{
    (void) conn_handle;
    (void) reason;

  //Serial.println();
  //Serial.print("Disconnected, reason = 0x"); Serial.println(reason, HEX);
}


i have this data :
15:49:38.381,RX,"414.84"
15:49:38.381,RX,"414.84"
15:49:38.382,RX,"407.81"
15:49:38.382,RX,"414.84"
15:49:38.383,RX,"411.33"
15:49:38.411,RX,"411.33"
15:49:38.412,RX,"407.81"
15:49:38.412,RX,"411.33"
15:49:38.412,RX,"414.84"
15:49:38.440,RX,"411.33"
15:49:38.441,RX,"414.84"
15:49:38.441,RX,"411.33"
15:49:38.442,RX,"414.84"
15:49:38.442,RX,"411.33"
15:49:38.443,RX,"407.81"
15:49:38.470,RX,"414.84"
15:49:38.471,RX,"411.33"
15:49:38.471,RX,"411.33"
15:49:38.472,RX,"414.84"
15:49:38.473,RX,"418.36"
15:49:38.501,RX,"414.84"
15:49:38.501,RX,"414.84"
15:49:38.501,RX,"414.84"
15:49:38.502,RX,"414.84"
15:49:38.502,RX,"414.84"
15:49:38.531,RX,"414.84"
15:49:38.531,RX,"411.33"
15:49:38.531,RX,"411.33"
15:49:38.532,RX,"411.33"
15:49:38.533,RX,"414.84"
15:49:38.561,RX,"421.88"
15:49:38.561,RX,"411.33"
15:49:38.561,RX,"414.84"
15:49:38.562,RX,"411.33"
15:49:38.563,RX,"414.84"
15:49:38.590,RX,"418.36"
15:49:38.591,RX,"411.33"
15:49:38.591,RX,"414.84"
15:49:38.592,RX,"411.33"
15:49:38.592,RX,"411.33"
15:49:38.593,RX,"411.33"
15:49:38.620,RX,"411.33"
15:49:38.621,RX,"411.33"
15:49:38.621,RX,"418.36"
15:49:38.622,RX,"418.36"
15:49:38.623,RX,"411.33"
15:49:38.650,RX,"411.33"
15:49:38.651,RX,"414.84"
15:49:38.651,RX,"411.33"
15:49:38.652,RX,"414.84"
15:49:38.652,RX,"418.36"
15:49:38.653,RX,"411.33"
15:49:38.680,RX,"411.33"
15:49:38.681,RX,"414.84"
15:49:38.681,RX,"411.33"
15:49:38.682,RX,"414.84"
15:49:38.683,RX,"411.33"
15:49:38.711,RX,"404.30"
15:49:38.711,RX,"411.33"
15:49:38.711,RX,"414.84"
15:49:38.712,RX,"411.33"

the probleme I receive different data at the same time.
I tried to ask the question on another forum its not answering

Thanks

Samou
 
Posts: 25
Joined: Thu May 07, 2020 12:19 pm

Re: Data acquisition with nRF52832 Bluefruit Feather card

by adafruit_support_bill on Mon Aug 31, 2020 10:46 am

I don't know what the code looks like on the iPhone side. But I suspect it is polling the port and the time-stamps represent the ties when the data was read - not when the data was sent.

adafruit_support_bill
 
Posts: 78709
Joined: Sat Feb 07, 2009 10:11 am

Please be positive and constructive with your questions and comments.