JohnBoy: [SOLVED] RF24

Post Reply
JohnBoy
Posts: 5
Joined: Tue Jan 16, 2018 3:49 pm

JohnBoy: [SOLVED] RF24

Post by JohnBoy » Wed Jan 17, 2018 12:03 pm

Recently I bought a maple mini (baite). Since then I desperately try to connect/use a nRF24 module to the board as receiver. With the older arduino uno it is no problem. So my question is, has somebody recently managed to get the RF24 module working and if so, what library and dso forth has been used.

I switched to the maple mini because I am building a drone and the mini has a higher clock frequency, so I can build a receiver (nRF24), gyro's/accel (MPU6050) and PID software in one processor and still are able to to do the PID calculations at a high frequency.

stevestrong
Posts: 2047
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany
Contact:

Re: RF24

Post by stevestrong » Wed Jan 17, 2018 12:59 pm

Welcome.

For nRF24 these links should bring you forward:
http://stm32duino.com/viewtopic.php?f=1 ... =20#p10126
http://stm32duino.com/viewtopic.php?f=1 ... =40#p11277

For controlling the drone you have to search the forum (the search field is on the top right corner of the page).

JohnBoy
Posts: 5
Joined: Tue Jan 16, 2018 3:49 pm

Re: RF24

Post by JohnBoy » Wed Jan 17, 2018 2:34 pm

Hi Steve?,

thanks for the quick reply. I tested the links and built the sender/receiver.
Everything seems okay (besides some warnings of redefinitions during compiling).
But the output of the receiver is totally rubish; even when I switch the sender of, the receiver produces the same random numbers
Could it be that the spi or RF24 libraries have changed in the meantime or that I use the wrong ones?
Maybe you could mail me the exact location for the both libraries,

thanks in advance

John

stevestrong
Posts: 2047
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany
Contact:

Re: RF24

Post by stevestrong » Wed Jan 17, 2018 3:07 pm

Sorry but I do not follow closely this topic, I think all information is there, I do not have any newer.
You should post in that thread, you will maybe get more information from the OP.

User avatar
Manny
Posts: 72
Joined: Wed Dec 09, 2015 3:15 pm

Re: RF24

Post by Manny » Wed Jan 17, 2018 11:54 pm

Try the RF24 library attached to this post...used to work for me.

http://stm32duino.com/viewtopic.php?f=3 ... =20#p20500

JohnBoy
Posts: 5
Joined: Tue Jan 16, 2018 3:49 pm

Re: RF24

Post by JohnBoy » Thu Jan 18, 2018 2:54 pm

Thanks all, at last I got the RF24 working.
Mistakes made :
I tried to use SPI_2, but the library only takes SPI_1;
I was sending from a arduino uno 7 integer values, but in the uno these are 2 byte values, in the maple mini as receiver these are 4 byte integers. after modifying the transmitter to uint32_t it worked fine. :D :D :D :D :D

User avatar
Manny
Posts: 72
Joined: Wed Dec 09, 2015 3:15 pm

Re: RF24

Post by Manny » Thu Jan 18, 2018 6:33 pm

JohnBoy wrote:
Thu Jan 18, 2018 2:54 pm
Thanks all, at last I got the RF24 working.
Mistakes made :
I tried to use SPI_2, but the library only takes SPI_1;
I was sending from a arduino uno 7 integer values, but in the uno these are 2 byte values, in the maple mini as receiver these are 4 byte integers. after modifying the transmitter to uint32_t it worked fine. :D :D :D :D :D
The library I posted you can choose which SPI instance in RF24_STM32.cpp I forgot to change it to 1 as I was using SPI_3..anyway glad you got it working.

Code: Select all

#include "nRF24L01_STM32.h"
#include "RF24_config_STM32.h"
#include "RF24_STM32.h"

SPIClass  _SPI(3);


Post Reply