Flowcode example Arduino and NRF24L01

For general Flowcode discussion that does not belong in the other sections.
solozerouno
Posts: 113
http://meble-kuchenne.info.pl
Joined: Tue Dec 08, 2020 4:36 am
Has thanked: 2 times
Been thanked: 2 times

Flowcode example Arduino and NRF24L01

Post by solozerouno »

I would need a flowcode example for transmitting and receiving a byte with a specific value between two Arduinos using two NRF24L01 modules ...... Thanks solozerouno

solozerouno
Posts: 113
Joined: Tue Dec 08, 2020 4:36 am
Has thanked: 2 times
Been thanked: 2 times

Re: Flowcode example Arduino and NRF24L01

Post by solozerouno »

absurdly I could use a NRF24L01 with an attiny 85 that sends a byte when a pin (the only free one on the attiny 85) is used as an input to an arduino? ..... 8kb memory is enough? .... you can give me an example ... I bought the avr pack and I would like to make the most of it ...... thanks solozerouno

solozerouno
Posts: 113
Joined: Tue Dec 08, 2020 4:36 am
Has thanked: 2 times
Been thanked: 2 times

Re: Flowcode example Arduino and NRF24L01

Post by solozerouno »

please i need help with these examples ..... thanks just zerouno

MJU20
Posts: 246
Joined: Tue Dec 08, 2020 5:11 pm
Has thanked: 75 times
Been thanked: 50 times

Re: Flowcode example Arduino and NRF24L01

Post by MJU20 »

Maybe this could help:

https://www.matrixtsl.com/mmforums/view ... F24#p69491

It's in version 7 but maybe you can import it?
I wrote this many years ago and since then I never used the NRF24.. again.
They weren't what I expected.

Later I used the "E32-868T20D" ( https://www.ebyte.com/en/product-view-news.html?id=132 )these are very good tranceivers. A project of mine is running on them for a long time now and they are very stable.
I think that they are discontinued but there are good replacements.

Last I've tested the HC12 modules. These are also very good, but for long distance I prefer the E32...'s

zoli2496
Posts: 28
Joined: Wed Sep 22, 2021 7:23 am
Been thanked: 2 times

Re: Flowcode example Arduino and NRF24L01

Post by zoli2496 »

How to use the nRF24L01 module in Flowcode V9? Unfortunately it doesn't work for me.
nRF24L01_TESTING_ADÓ.fcfx
TX
(10.6 KiB) Downloaded 69 times
nRF24L01_TESTING_VEVŐ.fcfx
RX
(11.15 KiB) Downloaded 72 times
Attachments
TX AND RX SETUP
TX AND RX SETUP
TX.JPG (51.24 KiB) Viewed 1944 times

BenR
Matrix Staff
Posts: 1747
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 444 times
Been thanked: 604 times

Re: Flowcode example Arduino and NRF24L01

Post by BenR »

Hello,

Does it help if you lower the SPI clock frequency by increasing the Prescale property. 16MHz / 4 could be too fast if there are wires or lengthy traces going to the modules.

I think I still have some of the modules here so let us know if you're still having problems and I'll see if I can get them working for you.

zoli2496
Posts: 28
Joined: Wed Sep 22, 2021 7:23 am
Been thanked: 2 times

Re: Flowcode example Arduino and NRF24L01

Post by zoli2496 »

Hello

Unfortunately, I can't start. I don't know which macro does what, which one is for what. Unfortunately, there is no example program in help that would help. A push button on the transmitter side and an LED on the receiver side. Please help me with an example program.

Thanks.

zoli2496
Posts: 28
Joined: Wed Sep 22, 2021 7:23 am
Been thanked: 2 times

Re: Flowcode example Arduino and NRF24L01

Post by zoli2496 »

cs_ss.JPG
cs_ss.JPG (50.82 KiB) Viewed 1914 times
How to set the CS/SS pins?


C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_SPI.c:152:4: warning: #warning "Hardware SPI may cause a lockup in your program if Hardware SS Pin is left as an input!"; [-Wcpp]
#warning "Hardware SPI may cause a lockup in your program if Hardware SS Pin is left as an input!";
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_SPI.c:153:4: warning: #warning "Suggest using the SS pin as the CS pin to ensure no lockup." [-Wcpp]
#warning "Suggest using the SS pin as the CS pin to ensure no lockup."
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_SPI.c:154:4: warning: #warning "SS pin must be set to an output or pulled high before initialising the SPI." [-Wcpp]
#warning "SS pin must be set to an output or pulled high before initialising the SPI."
^
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_SPI.c:155:4: warning: #warning "Refer to the device datasheet for the SPI hardware SS pin."; [-Wcpp]
#warning "Refer to the device datasheet for the SPI hardware SS pin.";

zoli2496
Posts: 28
Joined: Wed Sep 22, 2021 7:23 am
Been thanked: 2 times

Re: Flowcode example Arduino and NRF24L01

Post by zoli2496 »

Hello!

I read this in the code compiler: (Arduino Nano 328)


"Important user information. Please read." - OK

"Hardware SPI may cause a lockup in your program if Hardware SS Pin is left as an input!"; - what is the solution?

"Suggest using the SS pin as the CS pin to ensure no lockup." - how to set this up?

"Refer to the device datasheet for the SPI hardware SS pin.";

mnfisher
Valued Contributor
Posts: 977
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 105 times
Been thanked: 516 times

Re: Flowcode example Arduino and NRF24L01

Post by mnfisher »

You need to either use pin 10 as CS (chip select) or set it as an output.
Easiest is to use B2 as CS in the nrf code but you can output something to it instead of required.

Martin

Post Reply