mag auto align if idle
This commit is contained in:
parent
8d9b4fffdf
commit
4cad7ab867
|
@ -48,7 +48,8 @@ RF24 radio(9,10); //ce, cs
|
||||||
//Miso D12
|
//Miso D12
|
||||||
//Mosi D11
|
//Mosi D11
|
||||||
// Radio pipe addresses for the 2 nodes to communicate.
|
// Radio pipe addresses for the 2 nodes to communicate.
|
||||||
const uint64_t pipes[2] = { 0xF0F0F0F0E1LL, 0xF0F0F0F0D2LL };
|
const uint64_t pipes[2] = { 0xF0F0F0F0E1LL, 0xF0F0F0F0D2LL }; //0xF0F0F0F0xxLL, xx is 1-byte address
|
||||||
|
#define NRF24CHANNEL 75
|
||||||
|
|
||||||
struct nrfdata {
|
struct nrfdata {
|
||||||
uint8_t steer; //between 0 and 255, 127 is stop. will be scaled to -1000 to 1000
|
uint8_t steer; //between 0 and 255, 127 is stop. will be scaled to -1000 to 1000
|
||||||
|
@ -135,6 +136,8 @@ void setup() {
|
||||||
|
|
||||||
radio.setDataRate( RF24_250KBPS ); //set to slow data rate. default was 1MBPS
|
radio.setDataRate( RF24_250KBPS ); //set to slow data rate. default was 1MBPS
|
||||||
|
|
||||||
|
radio.setChannel(NRF24CHANNEL); //0 to 124 (inclusive)
|
||||||
|
|
||||||
radio.setRetries(15,15); // optionally, increase the delay between retries & # of retries
|
radio.setRetries(15,15); // optionally, increase the delay between retries & # of retries
|
||||||
radio.setPayloadSize(8); // optionally, reduce the payload size. seems to improve reliability
|
radio.setPayloadSize(8); // optionally, reduce the payload size. seems to improve reliability
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue