Go Down

Topic: working code for se8r01 (similar to nrf24l01) (Read 322 times) previous topic - next topic

swe-dude

Hello i finally got these working on Arduino and i wanted to share the code and maybe get a idea or 2 on improvements.

these modules are pin compatible with nrf modules and semi code compatible but not communication compatible.

This is what the modules look like
https://www.dropbox.com/s/94oknuk6o7h9yf3/IMG_1595.JPG?dl=0

I took all the functions, register addresses and calibration procedures from the code the seller supplied and converted the important parts to Arduino code. (not sure what the original code was supposed to run on)
I used a simple nrf code as a starting point and added all the functions and so on and the code seems stable i let it run over the night with no problem.

It seems these needs a lot more initiation then nrf24l01 modules i am not sure all the code are necessary but if i remove the initiation or calibration they wont work.

the code are not hardware spi dependent and you can change the pins to whatever you need

Just upload the code to 2 arduinos and set one to t and one to r and it should work.
Code: [Select]
byte mode ='r';      //r=rx, t=tx

I am adding the file the seller supplied too.

anyway let me know what you think.
 
https://www.dropbox.com/s/cwr0n1pv0nr9lkg/se8r01_rx_tx_2Mps.zip?dl=0

https://www.dropbox.com/s/o0n9ragvmhvod0n/1.5%E5%85%83%E6%A8%A1%E5%9D%97%E8%B5%84%E6%96%99.rar?dl=0


that is really awesome but your zip file seems to have lots of weird characters in it...

£define CEq       8

.....

void se8r01_calibration()
¨


        rf_switch_bank(iBANK1);

        gtempÿ0¦=0x40;
        gtempÿ1¦=0x00;
        gtempÿ2¦=0x10;
        gtempÿ3¦=0xE6;
 
£define TX_ADR_WIDTH    4   // 5 unsigned chars TX(RX) address width
£define TX_PLOAD_WIDTH  6  // 32 unsigned chars TX payload

unsigned char TX_ADDRESSÿTX_ADR_WIDTH¦  =
¨
  0x34,0x43,0x10,0x10
¼; // Define a static TX address


byte mode ='r';      //r=rx, t=tx

unsigned char rx_bufÿTX_PLOAD_WIDTH¦ = ¨0¼; // initialize value
unsigned char tx_bufÿTX_PLOAD_WIDTH¦ = ¨0¼;
//***************************************************


I can fix it but for example what is this character meant to be ?  |=  ?

could you make sure to save your files as ASCII please ?

Thanks !

swe-dude

eum no idea why you get those strange characters, i have tried it in arduino 1.0.5, 1.0.6 and the latest version too and i get none of those. what version are you trying using?

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy