NRF52840 with BendLabs sensor

HI every body

I use a 1 axis sensor connected to a NRF52840 board. A few weeks before, I was able to switch between visualization of the angles through usb link or using Bluetooth link to blink the LED.

Wanting to merge both firmware in order to visualize the angle through Bluetooth link, I tried connect the NRF52840 board with the IDE tool but it appears impossible to compile and upload anyone of the two firmware.

It is said something like no Arduino.h file existing … (see picture).

I have checked that the IDE is working (with your Open Log Artemis), and I have tried to upload various Arduino files without success.

Could you help me to correct that

Regards

Christian

Try loading the board definitions as outlined here https://learn.sparkfun.com/tutorials/nr … cuitpython and also be sure to either double-press the reset button or press and release it while holding the pin 13 button https://learn.sparkfun.com/tutorials/sp … bootloader and see how that goes

Hi

I have followed your recommendations :

. I have re-installed the Sparkfun nrf board following the full process

. I have double pressed the buttons before compilation and downloading

. After pressing the buttons, a window appears as the “NRF apres pression switch” image

. Assuming that I had nothing to do with that window, I closed it

. Then I ask for the compilation and the download,

. But I still got the error message as the “Error compil BLE example” image

. The same issue appears when trying to download the 1Axis_BasicRead file

I remind you :

1 / that all these downloading were ok a month ago in the same situation

2/ IDE works when downloading to a Artemis OpenLog

Hope you could help me

Regards

Christian

There is something path setttings, normally you do not even have to include Arduino.h as it is included (on the right moment) by default. Try to uncomment that line 21 and see what happens.

If it still fails :

can you share your complete sketch?

which NRF52840 board/ library do you use (there are many libraries that use this processor)

Hi again, Paul

I don’t know why but, without changing anything, I have no problem to upload two sketches …

However :

. I did not manage to upload other “iAxis_Basic readings” software except the Example1_2Axis…

. Once uploaded the Blinky Button BLE software, I succeeded to send a command to change the LED, but I did not manage to get the changed value after changing the Pin13 button. The value never appears (see image).

This data return is important for me as I need to merge the BLE software with the Example1 Axis reading one in order to get the values though my smartphone.

Christian

did you enable to receive notification by pushing the 3 arrows left of TX characteristic ?

I have redone the test after pushing the 3 arrows (on the right, not on the left ?).

After pushing the n13 button, the difference is that a line Value appears, but without Value (see attached images “before” and “after”).

It looks better : an idea ?

Christian

It was indeed the 3 arrows on the right hand side., not left :slight_smile:

if you use a standard SparkFun_nRF52840_Bluefruit_LED_Button.ino sketch this is the result I would expect as it is writing the button state :

  // If our button state has changed:
  int buttonState = digitalRead(BUTTON_PIN);
  if (buttonState != lastButtonState) {
    lastButtonState = buttonState;
    // Write the new button state to the bleuart TX char
    bleuart.write(!buttonState);
  }

Maybe explain a bit more what you would expect ?

OK, I am only expecting value changes from 0x00 to 0x01 as written in the nrf52840 develpt guide (see attached).

As soon I am sure that the BLE works, then I try to merge the BLE Blink Code to the 1Axis basic reading code (?)

Regards

Christian

Do you get the value 0 and 1 when you click and hold for 3 seconds the button a number of times. 5 to 10 seconds in between each push.

Hi,

A progress as 1/ very rarely, I have seen a return value, 2/ but, more significant, I have both values in the left page as attached image.

For the next step, I succeeded to make appear some of the Flex value on my Smartphone through BLE link but the situation is not stable enough.

Regards

Christian