Library conflicts nRF52840 Sense

Hello PJ,

tried both BSPs. Compiler always says "class TimerOne " has no member named ‘initialize’

Rads
Wolfgang

Hi there,
Yes that’s not uncommon for older setups, and that’s for an AVR.
Try this one and you’ll see the Seeed board is called out and supported , BSP 1.0.X

HTH
GL :slight_smile: PJ

PS> DO NOT USE Timer (0) ZERO… or :bomb: :face_with_peeking_eye:

Hello PJ,

Coming nearer.
Modifying TimerInterruptLEDDemo, I could use one timer for a short blink, following by a second timer for a longer pause.
But this sketch is only in milliseconds, and I need the first timer in microseconds…
Suggestion?

Thanks for your patience,

Wolfgang

Hello PJ,

Is there a way to reset the Bluetooth system? It is only used at the beginning of the sketch, to start the main program.

Regards,

Wolfgang

Hi there,
Great to hear that, There is a learning curve but it’s not Too heavy a lift though.
Here are some ways to stop BLE on an nRF52840:

  • Start and stop advertising: Use sd_ble_gap_adv_start() and sd_ble_gap_adv_stop()
  • Disconnect from the central: Use sd_ble_gap_disconnect() while in a connection
  • Stop scanning with BLE.end(): While the peripheral is off, stop scanning with BLE.end()
  • Disable completely the 2.4Ghz radio: After the 52840 has full soft device enabled and ble stack has been run, disable completely the 2.4Ghz radio

HTH
GL :slight_smile: PJ

Hello PJ,

the sd commands were not accepted, but “BLE.end” worked!!! Golden Tip!!
Many thanks,

Wolfgang

Result:


Bye,
Wolfgang

Hi there,
SWEET!
Incrementally moving forward… NICE!
GL :slight_smile: PJ

good to learn from it. dear.

Hello PJ,

my application allows only 6 milliseconds to measure x and y accelerations.
Using myIMU.readFloatAccelX(), each measurement takes between 651 and 670 microseconds. This allows for 8 measurements, which works, but I would like somewhat more samples. Is there a method to measure x and y at the same time?

Regards,

Wolfgang

Hi there,
Have a look at the data sheet that seems kind of low, If you use High performance mode, Higher clock, probably do better.
HTH
GL :slight_smile: PJ

Hello PJ,

tried all the Arduino IMU examples, always >650 µs.
No idea how to modify IMU readings, or what is behind “!2C_MODE”.

Regards,

Wolfgang

Hi there,
What about I2C clock speed or buss speed? any adjustments there?
With out seeing the code , Hard to see where you can gain. What the use case your attempting to satisfy.
HTH
GL :slight_smile: PJ

Hello PJ,

To use the acceleration sensors, I just copied the example HighLevelExample, as provided by Arduino.
It does not seem to allow any speed modifications.

Regards,

Wolfgang

Hi there,
Ok , I see. Well I know there’s a limit to the speed of getting the readings, even in the high level examples but seems kinda low. (pretty sure the config reg’s are NOT set to high performance)
imo. I would think using the fifo for example could improve that and also writing the values to memory with a DMA function. lots to see here too, I thought there was an interrupt driven one that yielded better speed.
Can you describe what it is you want to do more concisely as an overview.
is this a realtime app or a data logging situation?
Definitely use the search here for IMU readings etc. to find more solutions.
HTH
GL :slight_smile: PJ

Hello PJ,

My timer is mounted in my controline model aerobatic airplane. It provides pulses between 1 and 2 ms, each 8ms. The pulse length determines the speed of the motor which powers the plane. The idea is to keep the x acceleration constant during maneuvers, So, I need to measure the accelerations as accurately as possible, to avoid overshooting. Therefore I measure as often as possible, calculating averages, used to calculate the duration of the next pulse, Now I measure 4 times x and y, but I would like to improve the system by also measuring z…
In the past, I had a simple timer with a Microchip, programmed in Assembler, where an A/D conversion was very quick. But there external sensors made it clumsy, so I switched to the Seeed.

Hopefully I described my system well enough.

Regards,

Wolfgang

PS, Pictures and movies can be supplied :slight_smile:

Hi there,
Very well described, i have seen several rocket launch telemetry data sketches similar.
Ill ponder it for a spell and get back asap. :v:
GL :smiley: PJ